mat*_*ias 13 javascript testing jasmine angularjs protractor
我有以下需要找到的元素进行测试:
<div class="alert alert-danger" role="alert" ng-show="notValid">Zugangsdaten eingeben</div>
如何找到这个元素来检查可见性(ng-show)?
ng-show属性和值是唯一用于唯一标识元素的属性和值.该类用于许多元素......
我正在寻找类似的东西:
var notValid = element(by.Attribute('ng-show', 'notValid');
ale*_*cxe 22
你可以找到它by.css():
element(by.css('div[ng-show=notValid]'));
$('div[ng-show=notValid]');  // shortcut for the above expression
或者,by.xpath():
element(by.xpath('//div[@ng-show="notValid"]'));
| 归档时间: | 
 | 
| 查看次数: | 21033 次 | 
| 最近记录: |