@testim/testim-cli
Version:
Command line interface for running Testing on you CI
32 lines (27 loc) • 777 B
JavaScript
/**
*
* Dismisses the currently displayed alert dialog. For confirm() and prompt()
* dialogs, this is equivalent to clicking the 'Cancel' button. For alert()
* dialogs, this is equivalent to clicking the 'OK' button.
*
* <example>
:alertDismiss.js
// close a dialog box if is opened
client.alertText( function( err, res ) {
if ( res != null ) {
this.alertDismiss()
}
});
* </example>
*
* @see https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/dismiss_alert
* @type protocol
*
*/
module.exports = function alertDismiss () {
var requestOptions = {
path: '/session/:sessionId/dismiss_alert',
method: 'POST'
};
return this.requestHandler.create(requestOptions);
};