New answers tagged

0

I encountered a similar situation where I need to write an xPath for an element shown below: Element: <img src="webwb/pzspacer.gif!!.gif" class="inactvIcon" data-ctl="["DatePicker"]" style="cursor:pointer;"> I was able to grep the element using below xPath, where I used the backslash to escape the characters [ and ". Xpath: //img[@data-ctl='\[\"...


0

What's the problem then? Both xPaths seem functional. On the other hand, a good practice is to simplify it as much as possible, so it's readable for you in the future and for other people. The following xPath seems a bit more readable to me: //div[@id="opbox-category-tree"]//a[text()="Drukarki i skanery"] You don't need to write every element on the way ...


Top 50 recent answers are included