Launching IE in InPrivate mode (C# Selenium)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Launching IE in InPrivate mode (C# Selenium)

Christina Stead
Hi guys, 
I have an automated test suite that only uses IE (based on what our users use). I need to switch it to use InPrivate mode for running tests because a normal session basically doesn't log you out of our app(it's complicated and dumb). I tried the following options for the driver to see if that would allow for launching IE as InPrivate. 

 var options = new InternetExplorerOptions
                {
                    IgnoreZoomLevel = true,
                    ForceCreateProcessApi = true,
                    BrowserCommandLineArguments = "-private"
                };

The result is that I get this: “Unexpected error launching Internet Explorer. Unable to use CreateProcess() API. To use CreateProcess() with Internet Explorer 8 or higher, the value of registry setting in HEKY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth must be '0’.” 

I tried adding and setting that registrykey to 0, but that results in IE not loading (for reasons unbeknownst to me). 
I tried switching to use the 64bit IE driver, but it runs at a very slow rate on my machine. 
Does anyone know WHY this error is being thrown exactly? I'm running out of ideas on how to make it launch InPrivate mode. 
Does anyone have any suggestions on how to fix this issue? I'm using IE11. 

Thanks! 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2e066803-985f-442a-a5fc-eaafdbff25d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Launching IE in InPrivate mode (C# Selenium)

ח3בייס
Hello,

I have a problem just like you said here,
Trying to open a private instance of the Explorer browser (selenium webdriver +  c#) with the following code:

                        InternetExplorerOptions option = new InternetExplorerOptions();
                        option.ForceCreateProcessApi = true;
                        option.BrowserCommandLineArguments = "-private";
                        driverUser = new InternetExplorerDriver(option);
                        Drivers.Add(Browsers.userIE.ToString() , driverUser);

And you get the following error:

Unable to use CreateProcess() API. To use CreateProcess() with Internet Explorer 8 or higher, the value of registry setting in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth must be '0'.

I see that you published it about a year ago and you did not get an answer
Have you found a solution to this problem?
I would be very happy if you would share it with the solution

Thank you!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3b8da0b5-1988-4d52-8bd7-65c57c0d2bb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Launching IE in InPrivate mode (C# Selenium)

ח3בייס
In reply to this post by Christina Stead

try do remove this line:
                    "ForceCreateProcessApi = true,"
For me it helped.



בתאריך יום שישי, 5 באוגוסט 2016 בשעה 06:00:07 UTC+3, מאת Christina Stead:
Hi guys, 
I have an automated test suite that only uses IE (based on what our users use). I need to switch it to use InPrivate mode for running tests because a normal session basically doesn't log you out of our app(it's complicated and dumb). I tried the following options for the driver to see if that would allow for launching IE as InPrivate. 

 var options = new InternetExplorerOptions
                {
                    IgnoreZoomLevel = true,
                    ForceCreateProcessApi = true,
                    BrowserCommandLineArguments = "-private"
                };

The result is that I get this: “Unexpected error launching Internet Explorer. Unable to use CreateProcess() API. To use CreateProcess() with Internet Explorer 8 or higher, the value of registry setting in HEKY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth must be '0’.” 

I tried adding and setting that registrykey to 0, but that results in IE not loading (for reasons unbeknownst to me). 
I tried switching to use the 64bit IE driver, but it runs at a very slow rate on my machine. 
Does anyone know WHY this error is being thrown exactly? I'm running out of ideas on how to make it launch InPrivate mode. 
Does anyone have any suggestions on how to fix this issue? I'm using IE11. 

Thanks! 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a75c012e-dfdf-4d9d-9bd6-93ea6a41bc57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Launching IE in InPrivate mode (C# Selenium)

Brandon Dudek
Removing `ForceCreateProcessApi = true` workd. But it also disables the Private browsing.

On Wednesday, July 19, 2017 at 6:36:43 AM UTC-4, ח3בייס wrote:

try do remove this line:
                    "ForceCreateProcessApi = true,"
For me it helped.



בתאריך יום שישי, 5 באוגוסט 2016 בשעה 06:00:07 UTC+3, מאת Christina Stead:
Hi guys, 
I have an automated test suite that only uses IE (based on what our users use). I need to switch it to use InPrivate mode for running tests because a normal session basically doesn't log you out of our app(it's complicated and dumb). I tried the following options for the driver to see if that would allow for launching IE as InPrivate. 

 var options = new InternetExplorerOptions
                {
                    IgnoreZoomLevel = true,
                    ForceCreateProcessApi = true,
                    BrowserCommandLineArguments = "-private"
                };

The result is that I get this: “Unexpected error launching Internet Explorer. Unable to use CreateProcess() API. To use CreateProcess() with Internet Explorer 8 or higher, the value of registry setting in HEKY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth must be '0’.” 

I tried adding and setting that registrykey to 0, but that results in IE not loading (for reasons unbeknownst to me). 
I tried switching to use the 64bit IE driver, but it runs at a very slow rate on my machine. 
Does anyone know WHY this error is being thrown exactly? I'm running out of ideas on how to make it launch InPrivate mode. 
Does anyone have any suggestions on how to fix this issue? I'm using IE11. 

Thanks! 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/68d84e5c-5f6c-43cc-98be-a6eec4e5a6e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.