简体   繁体   English

Selenium Webdriver xpath找到元素

[英]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. 如何为上面的HTML代码编写xpath,其中Page $ 7唯一地找到元素,xpath应该通过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. 这是您的基本XPath表达式。 You should probably read up on that. 你应该读一读。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Selenium Webdriver无法通过xPath定位元素 - Selenium Webdriver can not locate element by xPath Selenium WebDriver 找到 object 文本。 错误 xpath 表达式的结果是:[对象文本]。 它应该是一个元素 - Selenium WebDriver find object text. Errors out with The result of the xpath expression is: [object Text]. It should be an element How to find web element by xpath using javascript code in python selenium webdriver? - How to find web element by xpath using javascript code in python selenium webdriver? 使用Selenium WebDriver和JavaScript从XPath找到Element的文本 - Get text from XPath located Element using Selenium WebDriver with JavaScript Selenium Webdriver找不到具有javascript的元素 - Selenium Webdriver cannot find the element that has javascript 使用 Selenium WebDriver 和 JavaScript 从 XPath 元素获取文本 - Get text from XPath Element using Selenium WebDriver with JavaScript 有没有办法在 Selenium WebDriver 中使用 JavaScript 通过 XPath 获取元素? - Is there a way to get element by XPath using JavaScript in Selenium WebDriver? 如何使用 selenium webdriver 查找按钮元素? - How to find button element with selenium webdriver? Python selenium 通过 xpath 或 css 选择器查找元素 - Python selenium find element by xpath or css selector Xpath与Selenium Webdriver无效“找不到Xpath” - Xpath not valid with Selenium Webdriver “Xpath not found”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM