Skip to content

Commit

Permalink
Catch driver.close() and driver.quit() during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elgalu committed Sep 18, 2017
1 parent 557c4eb commit 8a0e9e3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions s
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ assert "Google AdWords" in driver.title
print ("%s %s - Close driver and clean up" % (datetime.datetime.utcnow(), longId))
driver.close()

print ("%s %s - All done. SUCCESS! - will driver.quit()" % (datetime.datetime.utcnow(), longId))
driver.quit()
print ("%s %s - All done. SUCCESS! - DONE driver.quit()" % (datetime.datetime.utcnow(), longId))
print ("%s %s - (98%%) Test done - will driver.close()" % (datetime.datetime.utcnow(), longId))
try:
driver.close()
except:
pass

print ("%s %s - (99%%) Test done - will driver.quit()" % (datetime.datetime.utcnow(), longId))
try:
driver.quit()
except:
pass

print ("%s %s - (100%%) All done. SUCCESS! - DONE driver.quit()" % (datetime.datetime.utcnow(), longId))

0 comments on commit 8a0e9e3

Please # to comment.