Hi everyone,
is it possible to edit a repo item xpath to enable the use of methods with return value?
something like:
/div[@innertext='"somemethod(1,2)"']
thanks in advance.
Methods with a return value in repo
Re: Methods with a return value in repo
No, the path cannot have in logic outside of Regex.
What you CAN do, though, is to variablize the path and set the variable right before you need to use it.
MyRepoObject --> /div[@innertext=$var1]
Usercode:
var1 will be evaluated by the MyRepoObject call at the time the Click() is attempted.
What you CAN do, though, is to variablize the path and set the variable right before you need to use it.
MyRepoObject --> /div[@innertext=$var1]
Usercode:
Code: Select all
var1 = somemethod(1,2);
MyRepoObject.Click();
Shortcuts usually aren't...