0

In my nightwatch.conf.js I have:

"desiredCapabilities": {
                "browserName": "internet explorer",
                "javascriptEnabled": true,
                "acceptSslCerts": true,
            },

What is the name of the property that will run IE in Private mode?

The only answer I could find is this:

capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);  
    сapabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");

-- but I don't know how to add that to the JSON config.

I've tried:

"desiredCapabilities": {
                "browserName": "internet explorer",
                "javascriptEnabled": true,
                "acceptSslCerts": true,
                "IE_SWITCHES": "private",
            },

and:

"desiredCapabilities": {
                "browserName": "internet explorer",
                "javascriptEnabled": true,
                "acceptSslCerts": true,
                "args": "private",
            },

Without luck.

Alichino
  • 1,668
  • 2
  • 16
  • 25

1 Answers1

0

You could use the forceCreateProcessApi and browserCommandLineSwitches capabilities.

Try to set the forceCreateProcessApi to True and set the browserCommandLineSwitches as "-private"

More detail information, please check the following links:

Internet Explorer Setup

IE-specific DesiredCapabilities

Zhi Lv
  • 18,845
  • 1
  • 19
  • 30