Protractor: Find Element by Attribute

前端 未结 1 440
深忆病人
深忆病人 2021-01-07 23:06

I have the following element i need to find for testing:

Zugangsdaten eingeben<
相关标签:
1条回答
  • 2021-01-07 23:36

    You can find it by.css():

    element(by.css('div[ng-show=notValid]'));
    $('div[ng-show=notValid]');  // shortcut for the above expression
    

    Or, by.xpath():

    element(by.xpath('//div[@ng-show="notValid"]'));
    
    0 讨论(0)
提交回复
热议问题