I have xpath
Code: Select all
button/em[@class~'ico-visibility']
, but when button is clicked it will change to
Code: Select all
button/em[@class~'ico-visibility active']
So what I did was create variable name "Visibility" and set to empty, so my xpath now looks like this
Code: Select all
button/em[@class~'ico-visibility'+$Visibility+'']
This is almost working, I want to click when button is only 'ico-visibility'', but when its 'icon-visibility active' it doesnt work , because its requiring me to pass Visibility value with space front of it like this Visibility= " active";
I honestly dont want to variable value to have white space in front , because in future it will create confusion. What is the best way to over come this issue?