Highlighted
Frequent Visitor..
Frequent Visitor..
265 views

GetROProperty from a dynamic value

Jump to solution

Hello,

My issue is the following
I have an WebElement which have next innertext for e.g.:
123456789

What I would like is to retrive the text output of a location that changes dynamically for each run and compare it with a variable that I have predetermined.

My code :
Browser("Transportation Smartbench").Page("Transportation Smartbench").WebElement("unchecked").GetROProperty("innertext")

I'm adding the object to the local repository, however, the value is a constant. When I access the web page, the value changes dynamicaly and I want to be able to retrieve and compare it with a proper variable.

;ObjetRep.jpg

ObjetRep2.jpg

The script works as long as the innertext value is 317966356-1. But because the value changes each run,  when it's different, the script is unable to recognize the innertext. 

How can I retrieved the text output based on its location ?

 

Thank you for your help

0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner
Knowledge Partner

Have you tried removing the innertext values from the OR and tried using just the XPath?

Mark Smith.

View solution in original post

1 Reply
Highlighted
Knowledge Partner
Knowledge Partner

Have you tried removing the innertext values from the OR and tried using just the XPath?

Mark Smith.

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.