View Source Improve this doc

alertAccept

Accepts the currently displayed alert dialog. Usually, this is equivalent to clicking on the ‘OK’ button in the dialog.

Usage

1
browser.alertAccept();

Example

alertAccept.js
1
2
3
4
5
6
it('demonstrate the alertAccept command', function () {
if (browser.alertText()) {
browser.alertAccept();
}
// ...
});