Protractor Check if Element Does Not Exist

后端 未结 6 2020
长情又很酷
长情又很酷 2021-02-05 02:56

I have a setting in my angular based website that turns a dropdown on and off. If it is off, then it does not show on the main page.

With Protractor, I need to check to

6条回答
  •  鱼传尺愫
    2021-02-05 03:08

    Got the thing working by using something I found in the docs:

    expect(element(by.css('.switch')).isPresent()).to.become(false).and.notify(next);
    

    Also uses assertions, so it doesn't break cucumberjs.

提交回复
热议问题