2

我试图检查在线引导模式

./usr/local/lib/node_modules/protractor/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

我如何与模态框中的按钮进行交互?一些忠告?

4

1 回答 1

3

尝试这样的事情:

$('.modal-dialog').element(by.buttonText('OK')).getText()
于 2015-06-18T19:56:29.353 回答