【问题标题】:In selenium web driver, is there any tool to fetch css selector value? [closed]在 selenium web 驱动程序中,是否有任何工具可以获取 css 选择器值? [关闭]
【发布时间】:2014-08-08 17:18:12
【问题描述】:

在 selenium 网络驱动程序中,是否有任何工具可以获取 css 选择器值? 对于通过检查元素的 xpath,我们可以轻松地复制 xpath。 如何获取 css 选择器值?当我们通过 css 选择器值识别 web 元素时?

【问题讨论】:

  • 和你选择xpath一样。当您右键单击该元素标签时,您有一个复制 css 路径
  • 谢谢 .. 我观察到使用 findElement(By.CSSSelector) 比使用 Xpath 更准确地识别 iframe。

标签: selenium selenium-webdriver css-selectors


【解决方案1】:

为此目的使用 fireBug:

【讨论】:

  • 非常感谢..它的工作..谢谢..我观察到使用 findElement(By.CSSSelector) 比使用 Xpath 更准确地识别 iframe。
猜你喜欢
  • 2014-11-30
  • 1970-01-01
  • 2020-07-17
  • 1970-01-01
  • 1970-01-01
  • 2015-04-11
  • 1970-01-01
  • 2017-04-07
  • 2010-09-10
相关资源
最近更新 更多