java - Selenium, what exactly is a xpath -


i'm using selenium first time , locate webelement use selenium ide. id or name of webelement dynamicaly loaded xml file, build script use xpath of webelement, seems constant. want know xpath was. have idea i'm not sure. exemple locate specific link have :

//li[6]/ul/li[3]/a 

i understand follow : first "a" tag contained in third li of ul contained in sixth li of page. wrong ?

thank you.

<li></li> <li></li> <li></li> <li></li> <li></li> <li>     <ul>         <li></li>         <li></li>         <li>             <a>it find one</a>         </li>         <li></li>         <li></li>     </ul> </li> <li></li> <li></li> 

xpath cheat cheets:

http://scraping.pro/res/xpath-cheat/xpath_css_dom_recipes.pdf

http://scraping.pro/res/xpath-cheat/xpath_css_dom_ref.pdf


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -