@testim/testim-cli
Version:
Command line interface for running Testing on you CI
31 lines (26 loc) • 690 B
JavaScript
/**
*
* Accepts the currently displayed alert dialog. Usually, this is equivalent to
* clicking on the 'OK' button in the dialog.
*
* <example>
:alertAccept.js
// accept a dialog box if is opened
client.alertText( function( err, res ) {
if ( res != null ) {
this.alertAccept()
}
});
* </example>
*
* @see https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/accept_alert
* @type protocol
*
*/
module.exports = function alertAccept () {
var requestOptions = {
path: '/session/:sessionId/accept_alert',
method: 'POST'
};
return this.requestHandler.create(requestOptions);
};