javascriptnode.jscucumberwebdriver-io-v4

I'm trying to login to Facebook. After a successful login, I get a browser popup:


I'm trying to login to facebook, after successful login; am getting one notification popup asking for allowing and block. I'm fine with either case. I am using webstorm IDE cucumber.

I have already tried browser.alertDismiss(), browser.alertAccept() none of them are working: alert


Solution

  • You could try this answer:

    page.driver.browser.switch_to.alert.accept
    

    or

    page.driver.browser.switch_to.alert.dismiss
    

    That's ruby, but if you're using Selenium, I'm sure there's a javascript equivalent.