sam
sam

Reputation: 163

How to open browsers in private/incognito mode with selenium?

I'm writing Selenium tests in Ruby to test my website in multiple browsers.

However, the tests won't fire correctly unless the cookies are clear(there are triggers I'm testing that only happen X number of times and is stored in a cookie).

Does anyone know how to have selenium open a browser in its private browsing or incognito mode with Selenium or have another idea on how I might solve the issue?

Upvotes: 0

Views: 2685

Answers (1)

Abdo
Abdo

Reputation: 14051

You can get Chrome to start in incognito by default.

There's a solution for Windows at the bottom of the link below... If you're not using Windows, you can Google how to achieve this for you OS =)

https://productforums.google.com/forum/#!topic/chrome/sYaZkNW8II4

Upvotes: 2

Related Questions