D
D
Danil2016-08-29 10:51:32
Software testing
Danil, 2016-08-29 10:51:32

How to close alert in nightwatchjs?

I need to click OK on the alert. There is a simple code:

module.exports = {
    'Can user log in?' : function (browser) {
        browser
            .maximizeWindow()
            .url('http://127.0.0.1:3000')
            .waitForElementVisible('body', 1000)
            // Вот тут надо нажать ОК на алерте
    }
}

The documentation says to use the selenium protocol, but I can't find anywhere how to apply it to this code. Can you show an example of usage?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeniy _, 2016-08-29
@Veneomin

.acceptAlert()
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question