Highlighted
dkumar_1 Absent Member.
Absent Member.
210 views

Regular Expression

I am working on QTP automation of Java application. There are some links in left side navigation pane which changes frequently, like 'Repair10', 'Repair43', 'Repair153', 'Repair0', etc but Repair is always there. I tried this line of code : Browser("STP").Page("STP").WebElement("innertext:=Repair.*").Exist(2) but it is not working.

Any suggestion?
Tags (1)
0 Likes
1 Reply
Henry Floyd Absent Member.
Absent Member.

Re: Regular Expression

Sounds like you have more than one webelement matching try the following


Browser("STP").Page("STP").WebElement("innertext:=Repair.*","index:=0").Exist(2)
0 Likes
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.