royd
8 years agoRegular Contributor
Handling different values of the same object attribute, in two areas of the application?
Using TestComplete 12.3, JScript.
The menu panel of our application "idStr" (id) value are different in two areas of our application ("mainMenuInner" and "navMenuInner" repectively). Is there a way to include both values into the mix to set a variable? Something like-
var mainMenu = page.Find("idStr", "mainMenuInner" || "navMenuInner", 10, 1000);
I did try that, but did not work on the page where the value is "navMenuInner".
Thanks for help in advance.
Dave
Hi Dave,
Two more options:
a) Wildcards: e.g. var mainMenu = page.Find("idStr", "*MenuInner", 10, 1000);
b) Regular expressions: e.g. var mainMenu = page.Find("idStr", "regexp: (mainMenuInner)|(navMenuInner)", 10, 1000);