Micro Focus QTP (UFT) Forums
Help with code using different html ids - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Help with code using different html ids (/Thread-Help-with-code-using-different-html-ids)



Help with code using different html ids - NeedQTPHelp - 06-01-2009

Hi Everyone,
I need some help with writing a code to select links based on the html id. Problem is that in the application different links have different ids eg id_100987, id_200492, id_101492
And if I use id_.*then it picks up links which I don't want.
code I am using is:

Code:
strSS=Browser(B).Page(P).WebElement("html id:=id_100.*", "index:=0").GetROProperty("innertext")

MsgBox strSS

This works as long as the id starts with html:=id_100 but I want QTP to click on all the links where html id starts with id_100, id_101 and id_200

Please help,
Thanks in advance


RE: Help with code using different html ids - stephenlb4u - 06-01-2009

Could you explain in detail???

what are the links u want to click and what and all u want to omit.