Micro Focus QTP (UFT) Forums
prob with WebElement object - 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: prob with WebElement object (/Thread-prob-with-WebElement-object)



prob with WebElement object - swarnavure - 09-17-2008

In my application there is a link which is of WebElement class and to my knowledge i read WebElement class objects cannot be recorded so i have to specify the object by its properties to apply method on it ofcoz i need to apply click method on it. But there are 5 links of the same class and having all the properties set similarly,so when i am running the test i get an error like it is not able to identify the object as there are several object with similar object properties (text/Run).
Even i tried the scipt like creating an object and adding fields like name and index but still its not working...Sad
so plz help me out........


RE: prob with WebElement object - kishoreinchennai - 09-18-2008

index will be unique use that property

regards
Kishore


RE: prob with WebElement object - swarnavure - 09-18-2008

[quote=kishoreinchennai]
No, it does not have index property, and so its not able to identify.
please help me/....


RE: prob with WebElement object - roxer - 09-18-2008

Hi, swarnavure
Can you give code how you tried to use index?
Also, attached screenshots of ObjectSpy for this WebElement and HTML code of these links could be useful. So maybe I will help you


RE: prob with WebElement object - Sonia - 09-26-2008

Hi ,

I am not sure if this will help , but I had some issues with Webelements as well .
Try this :

1.
Code:
Webelement( "innertext:= whatever name " , "index:= 0 ")


whatever name is the actual name of the webelement on the page

2. You could also try to include the webelement in your OR and then include it in your script. Then the Click will work on that Webelement

Hope this helps, Sonia