A Selenium test clicks a 'Delete Account' button but the confirmation dialog is a browser-native alert (not HTML). How should the test handle dismissing it?
-
A
driver.findElement(By.id('confirm')).click()
-
B
driver.switchTo().alert().accept()
-
C
Use Actions class to press Enter
-
D
Use Robot class to click OK