Ignore Alert

Ignore Alert #


Command will close alert opened by alert(), prompt() or confirm() JavaScript functions.

Calling command on a non-existent alert will log an error but not fail the test.

client => {
        // Example of closing alert before taking a screenshot
        .waitForElementVisible('input[title="Search"]', 10000)
        .execute(function () {
A typical use case, as shown in the example, is to close an alert before taking a screenshot.