How to launch web browsers in "Private" mode in a scenario?

Challenge

How to launch web browsers in "Private" mode in a scenario?

Solution

Web browsers such as Internet Explorer, Chrome and Firefox offer a “Private” mode. Launching web browsers in “Private” mode does not offer complete privacy but it does help when creating tests that will closely simulate a first-time user’s interaction with the website/ web application.

When a browser works in this mode, it behaves as if you have just installed it. It uses neither cookies nor temporary files created by previous browser sessions. In addition, when you use this mode, the browser automatically clears created cookies and temporary files when you disable the mode or close the browser.

The steps below will demonstrate how to set up the “Start Application” action in Scenariobuilder to launch a web browser in “Private” mode. In the example below the web browser will be launched in “Private” mode and open the www.nrgglobal.com home page.

1. Add a “Start Application” action to the scenario.

How to launch web browsers in _Private_ mode in a scenario_ (227824188)_s

2. Edit the Properties Section in the action to point to the web browser’s executable :

  • If using Google Chrome:

 In the Application Name field in the Properties section add;

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito http://www.nrgglobal.com

How to launch web browsers in _Private_ mode in a scenario_ (227824188)_s1

  • If using Internet Explorer:

In the Application Name field in the Properties section add;
"C:\Program Files\Internet Explorer\iexplore.exe" –private http:// www.nrgglobal.com

How to launch web browsers in _Private_ mode in a scenario_ (227824188)_s2

  • If using Firefox:

In the Application Name field in the Properties section add;
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -private http://www.nrgglobal.com

How to launch web browsers in _Private_ mode in a scenario_ (227824188)_s3

Note: In the examples provided, the web browser’s executable was installed in the default directory. 

Tip: To launch the web browser in an unspecified window remove the URL portion (in this example: http://www.nrgglobal.com) from the Application Name field.