How to identify a Dynamic WebElement? - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: How to identify a Dynamic WebElement? (/Thread-How-to-identify-a-Dynamic-WebElement) |
How to identify a Dynamic WebElement? - PreethiJoshi - 05-03-2018 I want to identify a web element (TIN Number) which is dynamic in nature. Every time the value is different. I used below code. The innertext is not updating . How to identify innertext dynamically? I have attached object spy as well. Currently TIN value is "113482671" but will change in the next iteration. Please help!! Code: Public Function SelectTIN() Code: '..........Store TIN Number Code: '............Get TIN Number RE: Get Dynamic Innertext - Ankur - 05-03-2018 Using ChildObjects fetch the dynamic value of innertext and use that in a Descriptive programming statement. You seem to be mixing two methods of writing Descriptive programming statements. Here is the simplest way in your case to identify the webelement, (once you have fetched the value above). Code: Browser("micclass:=Browser").Page("micclass:=Page").WebElement("micclass:=Web Element","innertext:="&TIN).Click |