3

Is there a way to clear out session data for a driver instance in WebDriver? My code is written in C# (and NUnit), but I'm not picky on the language for the answer.

2 Answers 2

5

I've found that the deleteAllCookies function works differently in different browsers. DeleteAllCookies will delete all session data in Chrome, but only cookies in firefox. I'm still looking for a good way to delete session data in FF

4

In Java, you can delete all the cookies by calling driver.manage().deleteAllCookies().

1
  • 2
    I am suing Chrome , but for me it is not clearing form data. Commented Aug 19, 2018 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.