测试引导模态元件NoSuchElementError - pro拖拉机

时间:2021-06-19 01:21:38

I tried to check online bootstrap modal

我试着检查在线引导模式

./usr/local/lib/node_modules/protractor/bin/elementexplorer.js https://angular-ui.github.io/bootstrap/

。/ usr /地方/ lib / node_modules /量角器/ bin / elementexplorer。js https://angular-ui.github.io/bootstrap/

element(by.id('modal')).element(by.tagName('button')).click();
element(by.css('btn btn-primary'));
There was a webdriver error: NoSuchElementError No element found

How can i interaction with a button in modal box? some advice?

如何与模式框中的按钮交互?一些建议吗?

1 个解决方案

#1


3  

Try something like this:

试试这样:

$('.modal-dialog').element(by.buttonText('OK')).getText()

#1


3  

Try something like this:

试试这样:

$('.modal-dialog').element(by.buttonText('OK')).getText()