user1944151
user1944151

Reputation: 353

webdriver: force browser do "forget" history+coockies

I need to do this:

  1. login as the main user (enter usr/pwd)
  2. enable/disable something
  3. logout from admin
  4. login again as the main user At point 4 (login again) sometimes the application requires usr/pwd ( which is fine) but a few times, it logged in without them ( guess because of cookies)

Is there any way to force browsers ( ff/ie/chrome) to "don't" save any history or usr/pwd , etc? I'm using webdriver 2.41 ina a grid environment using TestNG and Java.

Upvotes: 1

Views: 65

Answers (1)

Karthikeyan
Karthikeyan

Reputation: 2724

There is a property called ensureCleanSession in the DesiredCapablity profile. For more details please visit this official doc.

I have used this with IE alone. Please read through the doc for other browser supports.

Upvotes: 1

Related Questions