0

How to handle THIS type of notification in selenium web driver.

Dadep
  • 2,756
  • 5
  • 25
  • 37

1 Answers1

0

Hope you are trying to handle an alert window on a webpage while running.

Below code can help you out:

Alert alert = driver.switchTo().alert();
alert.accept();

You can also decline the alert box:

Alert alert = driver.switchTo().alert();
alert().dismiss();

Some useful links: Alert Notification

undetected Selenium
  • 151,581
  • 34
  • 225
  • 281
Priya P
  • 123
  • 1
  • 3
  • 11