Asserting an element is focused

后端 未结 7 902
傲寒
傲寒 2020-12-16 18:50

According to the How do I assert an element is focused? thread, you can check if an element is focused by switching to an activeElement() and assert this is the

7条回答
  •  感动是毒
    2020-12-16 19:48

    What about using CSS selectors and :focus

    expect(element.all(by.css('#myid:focus')).count()).toBe(1);
    

提交回复
热议问题