Forum Discussion

AMR013's avatar
AMR013
Contributor
2 years ago

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 ...
  • rraghvani's avatar
    2 years ago

    You can construct it like so,

    var num = 100;
    var param = "//td[contains(., '" + num.toString() + "')]";
    Aliases.browser.pageWhoa.FindElement(param);