Forum Discussion

cadeo's avatar
cadeo
New Contributor
2 years ago
Solved

Click on Span Object not working occasionally

I have the following menus in my application  When I click on 'Self Service Tool' menu or hover over it, the following submenus displays Here is my code to click on the 'Self Service To...
  • tvklovesu's avatar
    tvklovesu
    2 years ago

    cadeo, just realized there is an extra space at the beginning and end of the text. thats why its not able to find the object. use the normalize-space method in the xpath.

    ps: Do not copy and paste the below syntax as sometimes the quotes might be replaced with special chars and will not work in code. Please type manually in the code.

    //li/a[normalize-space(.) ='Self Service Tool']