.alerts.setText() Suggest edits
Send keystrokes to a JavaScript prompt() dialog.
Usage
.alerts.setText(value, [callback])
Example
module.exports = {
'set text on JS prompt': function (browser) {
browser
.alerts.setText('some text', function () {
console.log('text sent to JS prompt successfully');
});
},
'set text on JS prompt with ES6 async/await': async function (browser) {
await browser.alerts.setText('some text');
}
};
Parameters
Name | Type | description |
---|---|---|
value |
string | Keystrokes to send to the prompt() dialog |
callback Optional |
function | Optional callback function to be called when the command finishes. |