AMR013
2 years agoContributor
Any way to modify object's Full Name to use variable defined in project?
Hello,
I'm trying to click an object on a screen via scripting. When I use the Object Spy, the Full Name shows as follows:
Aliases.browser.pageWhoa.FindElement("//td[contains(., '100')]")
I defined the "100" value as follows:
var record = '100'
While I could just use this name and click on it, I want to make it "universal" as the "100" value will vary. Is there any way to modify the Full Name to incorporate my record variable?
Appreciate the help in advance.
You can construct it like so,
var num = 100; var param = "//td[contains(., '" + num.toString() + "')]"; Aliases.browser.pageWhoa.FindElement(param);