Reputation: 11205
Is there a way to force close a webdriver inspite of any alerts present? I know that I can close any alerts using the Alert api, but the issue is that I don't know what other situations which may cause webdriver to be blocked.
At present it hangs on an alert dialog and driver.close()
does not close it. I need a sure way to simply close the webdriver inspite of anything present that may cause it to block.
Upvotes: 0
Views: 350
Reputation: 6950
Use driver.quit() instead of driver.close() for such scenarios.
Upvotes: 1