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

问题描述

如何在WebdriverIO中查找具有自定义名称的元素

如何在documentsuploaded中查找具有此特定类名称ng-repeat =“ document的元素”

enter image description here

解决方法

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

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

另请参阅https://www.w3schools.com/cssref/css_selectors.asphttps://devhints.io/xpath

,

您的问题的答案是以下CSS选择器:

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