UNPKG

nightwatch

Version:

Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.

16 lines (14 loc) 508 B
const ProtocolAction = require('./_base-action.js'); /** * Gets the text of the currently displayed JavaScript alert(), confirm(), or prompt() dialog. * * @link /#get-alert-text * @param {function} callback Callback function which is called with the result value. * @returns {string} The text of the currently displayed alert. * @api protocol.userprompts */ module.exports = class Session extends ProtocolAction { command(callback) { return this.transportActions.getAlertText(callback); } };