I have a test case that takes the variables shouldLogout
and shouldCloseBrowser
, both set to true
by default. I also have a teardown method that looks like this :
@TearDown(skipped = false)
def tearDown() {
if (shouldLogout) {
WebUI.click(findTestObject('Object Repository/Page_Sign In/li_Sign Out'))
}
if (shouldCloseBrowser) {
WebUI.closeBrowser()
}
`}
`
In Firefox, when I run this test, everything goes according to plan: the test runs and, regardless of its end state, it logs out of the app and shuts down the driver. However, when I run this in Chrome, not only does the browser stay open, but the session is still logged in! I took no actions on the Chrome window. What is causing this?!