![]() |
Unable to capture value of Webelement which is changing dynamically - 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: Unable to capture value of Webelement which is changing dynamically (/Thread-Unable-to-capture-value-of-Webelement-which-is-changing-dynamically) |
Unable to capture value of Webelement which is changing dynamically - sheetal - 11-04-2009 Hi All, I am trying to automate a web application developed in Java. Attached is the screenshot. In the screen, I want to capture the value of Issue# which is 12544 in the screen. When I capture the property of the object its seen as Browser-> Page -> WEbElement -> WebTable ->innertext. But the value of WebTable changes dynamically like WebTable,WebTable_1,WebTable_2. I used regular expression for this and I am trying to capture the value currently as Code: Browser("AES - CATS - Login >>").Page("Whitepaper Summary But I am getting a run-time error saying - The "[ WebElement ]" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object. Please can you help me in identifying the object uniquely and capturing the value... Regards, Sheetal RE: Unable to capture value of Webelement which is changing dynamically - venkatbatchu - 11-04-2009 Hi, As per the object state mentioned i.e, Browser-> Page -> WEbElement -> WebTable ->innertext. Then it will comes like this Code: Browser("xxxX").Page("xxxxx").WebElement("xxxx").WebTable("xxxxxx").getcelldata(row,column) But ur code seems Code: Browser("AES - CATS - Login >>").Page("Whitepaper Summary Here u were capturing innertext directly from webelement instead of webtable Finally after getting the cell value then use the Mid function to capture the required value from the cell Try with this and let me know if u have any issues.. RE: Unable to capture value of Webelement which is changing dynamically - basanth27 - 11-04-2009 Sheetal - Can you provide a spyshot of the Webelement ? It is necessary because i believe the name of the webelement is webtable and not a webtable there actually. RE: Unable to capture value of Webelement which is changing dynamically - sheetal - 11-04-2009 Thanks for the replies... Basanth @ - As u told the WebTable is name of Webelement and not a webTable object as such. I have attached the screenshot. Venkat@ - Since there is no WebTable object I cannot use the fucntion you have mentioned below. Sorry for the wrong information. I am attaching the ObjectSPy screenshot. Please can you have a look at it and help me out.. RE: Unable to capture value of Webelement which is changing dynamically - venkatbatchu - 11-04-2009 Hi Sheetal, Did u try like this Code: Browser("xxxX").Page("xxxxx").WebElement("xxxx").WebTable("Issue #").GetRoProperty(“text”) sorry it is Code: Browser("xxxX").Page("xxxxx").WebTable("Issue #").GetRoProperty use webtable instead of webelement to get the dynamic value RE: Unable to capture value of Webelement which is changing dynamically - sheetal - 11-04-2009 I am unable to use WebTable directly under Page. Please can you suggest any other solution. RE: Unable to capture value of Webelement which is changing dynamically - Saket - 11-04-2009 try using one more property like index with the name. like- Code: Browser("AES - CATS - Login >>").Page("Whitepaper Summary RE: Unable to capture value of Webelement which is changing dynamically - venkatbatchu - 11-04-2009 But your screenshot is showing that webtable("Issue#") has been placed under "Page" So while adding the object to object repository add this object as webtable, then your problem will resolve RE: Unable to capture value of Webelement which is changing dynamically - qtp.sandeep - 07-30-2012 Hi all...Iam stuck up with an issue from three days...could some one help me to understand how to click a security question which changes during every run time...in an other words it changes evry time when i close and open the security questions page eg : Browser("ABC").Page("abc").Webelement("xyz").Click .... it works for the first time ..but in the nect Run xyz changes to Webelement("123") or Webelement("rrr") and qtp is unable to identify this question and it fails the Script... RE: Unable to capture value of Webelement which is changing dynamically - janki_kakadia - 02-16-2018 (07-30-2012, 01:34 PM)qtp.sandeep Wrote: Hi all...Iam stuck up with an issue from three days...could some one help me to understand how to click a security question which changes during every run time...in an other words it changes evry time when i close and open the security questions page hiee sandeep , did you get solution for this isue. if yes please share with me. because i am stuck in this since 4 days. thank you |