【问题标题】:Selecting Multiple Selectors for increased specificity in Selenium Using Python使用 Python 在 Selenium 中选择多个选择器以提高特异性
【发布时间】:2015-05-02 02:17:09
【问题描述】:
<input class="radio-field" type="radio" checked="checked" value="0" name="value(WoundCareDone)">

大家好,我有一个小问题。

我想选择名称的 xpath。它会像这样 //input[@name="value(WoundCareDone)"] 对吗?

所以我想如何在 xpath 中包含值 0,因为仅使用上述 xpath 会产生 2 个结果。我们如何在 xpath 中包含 value="0"?

【问题讨论】:

    标签: python selenium xpath


    【解决方案1】:

    像这样:

    //input[@name="value(WoundCareDone)" and @value = "0"] 
    

    【讨论】:

      猜你喜欢
      • 2022-06-28
      • 1970-01-01
      • 2021-04-19
      • 1970-01-01
      • 2013-06-13
      • 1970-01-01
      • 2019-08-19
      • 1970-01-01
      • 2019-06-13
      相关资源
      最近更新 更多