tony_forde
3 years agoNew Contributor
How to passing text project variable to xpath in name mapping
Hi,
I'm trying to parameterise the xpath for an object in my name mapping. The default value in name mapping is:
//span[text()='Theme 1']
In my web app, I have dropdowns for "Theme 1", "Theme 2", "Theme 3"... so I've set this up as a project variable:
Project.Variables.Theme
In my test I set the project variable to "Theme 1", "Theme 2", "Theme 3"... whatever required.
And in the name mapping I've tried, unsuccessfully, to use this:
//span[text()='" + Project.Variables.Theme + "']
But it doesn't work 😞 Any ideas?
Thanks in advance,
Tony