I want to get an element with the script() function, but I want to use a variable I have defined within my XPath. Any idea on how this can work?
I'm using Karate 1.0.1.
* def username = __arg.username
* print 'username:', username
* def listRowElement = script("//div[@aria-colindex='1' and text()='"+username+"']", '_.textContent')
* mouse().move(listRowElement).click()
It works fine if I just put the username in, but I want it to be reusable.
Thanks in advance for your input.