0

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

Dadep
  • 2,796
  • 5
  • 27
  • 40

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
  • 183,867
  • 41
  • 278
  • 352
Priya P
  • 123
  • 1
  • 4
  • 11