Forum Discussion

AMR013's avatar
AMR013
Contributor
10 months ago
Solved

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
    10 months ago

    You can construct it like so,

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