selenium how to automate javascript dialogs code example Example: selenium how to automate javascript dialogs webDriver.switchTo().alert()