简体   繁体   English

如何在 WebDriverIO 中使用自定义 class 名称

[英]how to use custom class names in WebDriverIO

how to find an element with custom class name in WebdriverIO如何在 WebdriverIO 中查找具有自定义名称 class 的元素

how to find element with this particular class name ng-repeat="document in documentsUploaded"如何查找具有此特定名称 class 的元素 ng-repeat="documents in documentsUploaded"

在此处输入图像描述

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

ng-repeat is not a class, it's an element's attribute. ng-repeat 不是 class,它是一个元素的属性。

See also https://www.w3schools.com/cssref/css_selectors.asp and https://devhints.io/xpath另见https://www.w3schools.com/cssref/css_selectors.asphttps://devhints.io/xpath

The answer for your question is following CSS selector:您的问题的答案如下 CSS 选择器:

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

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

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