I am using Selenium via Java.
My test case logs into an account, but when the next test case runs (which happens to also log into an account) it fails since the credentials are still saved from the previous test case.
So, I used the driver.manage().deleteAllCookies() method, however, this method does NOT delete all cookies thus does not delete the cookie I want to be deleted. So I used the delete driver.manage().deleteCookieNamed("facebook") method but it does NOT delete the facebook cookie because it determines it not to exist for some reason when in fact it does exist.
My questions are, how does the selenium cookie method determine what cookies exist? My second question is, how can I delete this cookie? My third question is, if I can't delete this cookie, what other options do I have to delete the browser data in order for my test case to pass?