简体   繁体   中英

Selenium Webdriver xpath to find element

<a style="color:White;" href="javascript:__doPostBack('dnn$ctr674$Case$gvCaseSearchDetails','Page$7')">7</a>

How to write xpath for the above HTML code in which Page$7 finds the element uniquely and the xpath should find multiple elements through the xpath. Please do the needful Thank in Advance :-)

The following code will do the trick

//a[contains(@href,'Page$7')]

This is your basic XPath expression. You should probably read up on that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM