【问题标题】:how to use custom class names in WebDriverIO如何在 WebDriverIO 中使用自定义类名
【发布时间】:2021-01-07 23:18:06
【问题描述】:

如何在 WebdriverIO 中找到具有自定义类名的元素

如何使用这个特定的类名 ng-repeat="document in documentsUploaded" 查找元素

【问题讨论】:

    标签: css-selectors webdriver-io custom-selectors webdriver-io-v4


    【解决方案1】:

    简短的回答是:使用 CSS 或 xpath 选择器 https://webdriver.io/docs/selectors.html

    ng-repeat 不是一个类,它是一个元素的属性。

    另见https://www.w3schools.com/cssref/css_selectors.asp和https://devhints.io/xpath

    【讨论】:

      【解决方案2】:

      您的问题的答案是遵循 CSS 选择器:

      tr[ng-repeat='document in documentsUploaded']
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-12-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-11-24
        • 2017-12-25
        相关资源
        最近更新 更多