I use safari driver in my tests automation. When I try to use driver.close()
to close safari, there is always a popup "Are you sure you want to quit this site"?
How can I ignore the popup or disable the popup? I want the browser to close directly when I do driver.close
.
I use selenium 3.4 and safari 11.0, and Java.
Here's my code:
SafariOptions options = new SafariOptions();
options.setUseCleanSession(true);
WebDriver driver = new SafariDriver(option);
driver.manage().window().maximize();