Open Internet Explorer in Private Mode with Selenium
up vote
0
down vote
favorite
So I've been trying to open IE in Private using selenium (C#), this is the closest i've come so far:
InternetExplorerOptions op = new InternetExplorerOptions();
op.PageLoadStrategy = PageLoadStrategy.Normal;
op.IgnoreZoomLevel = true;
op.InitialBrowserUrl = "https://entry.wgrintra.net/schadenwv/servlet/main";
op.ForceCreateProcessApi = true;
op.BrowserCommandLineArguments = "-private";
IWebDriver driver = new InternetExplorerDriver(op);
The problem here is, after 60 seconds of opening the browser (correctly in private) the driver times out (last step doesn't finish).
I've looked around a lot, most is just using Capabilities which are not useful anymore.
(I had to add a value to the registry to be able to forcecreate the process api)
c# internet-explorer selenium-webdriver internet-explorer-11 selenium-iedriver
add a comment |
up vote
0
down vote
favorite
So I've been trying to open IE in Private using selenium (C#), this is the closest i've come so far:
InternetExplorerOptions op = new InternetExplorerOptions();
op.PageLoadStrategy = PageLoadStrategy.Normal;
op.IgnoreZoomLevel = true;
op.InitialBrowserUrl = "https://entry.wgrintra.net/schadenwv/servlet/main";
op.ForceCreateProcessApi = true;
op.BrowserCommandLineArguments = "-private";
IWebDriver driver = new InternetExplorerDriver(op);
The problem here is, after 60 seconds of opening the browser (correctly in private) the driver times out (last step doesn't finish).
I've looked around a lot, most is just using Capabilities which are not useful anymore.
(I had to add a value to the registry to be able to forcecreate the process api)
c# internet-explorer selenium-webdriver internet-explorer-11 selenium-iedriver
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
So I've been trying to open IE in Private using selenium (C#), this is the closest i've come so far:
InternetExplorerOptions op = new InternetExplorerOptions();
op.PageLoadStrategy = PageLoadStrategy.Normal;
op.IgnoreZoomLevel = true;
op.InitialBrowserUrl = "https://entry.wgrintra.net/schadenwv/servlet/main";
op.ForceCreateProcessApi = true;
op.BrowserCommandLineArguments = "-private";
IWebDriver driver = new InternetExplorerDriver(op);
The problem here is, after 60 seconds of opening the browser (correctly in private) the driver times out (last step doesn't finish).
I've looked around a lot, most is just using Capabilities which are not useful anymore.
(I had to add a value to the registry to be able to forcecreate the process api)
c# internet-explorer selenium-webdriver internet-explorer-11 selenium-iedriver
So I've been trying to open IE in Private using selenium (C#), this is the closest i've come so far:
InternetExplorerOptions op = new InternetExplorerOptions();
op.PageLoadStrategy = PageLoadStrategy.Normal;
op.IgnoreZoomLevel = true;
op.InitialBrowserUrl = "https://entry.wgrintra.net/schadenwv/servlet/main";
op.ForceCreateProcessApi = true;
op.BrowserCommandLineArguments = "-private";
IWebDriver driver = new InternetExplorerDriver(op);
The problem here is, after 60 seconds of opening the browser (correctly in private) the driver times out (last step doesn't finish).
I've looked around a lot, most is just using Capabilities which are not useful anymore.
(I had to add a value to the registry to be able to forcecreate the process api)
c# internet-explorer selenium-webdriver internet-explorer-11 selenium-iedriver
c# internet-explorer selenium-webdriver internet-explorer-11 selenium-iedriver
asked Nov 21 at 10:18
Basil Fuchs
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Try to refer code example below and make a test with it on your side may help to solve your issue.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
Reference:
How to Open Internet Explorer Browser in Incognito / Private mode using Selenium / WebDriver ?
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Try to refer code example below and make a test with it on your side may help to solve your issue.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
Reference:
How to Open Internet Explorer Browser in Incognito / Private mode using Selenium / WebDriver ?
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
add a comment |
up vote
0
down vote
Try to refer code example below and make a test with it on your side may help to solve your issue.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
Reference:
How to Open Internet Explorer Browser in Incognito / Private mode using Selenium / WebDriver ?
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
add a comment |
up vote
0
down vote
up vote
0
down vote
Try to refer code example below and make a test with it on your side may help to solve your issue.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
Reference:
How to Open Internet Explorer Browser in Incognito / Private mode using Selenium / WebDriver ?
Try to refer code example below and make a test with it on your side may help to solve your issue.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
Reference:
How to Open Internet Explorer Browser in Incognito / Private mode using Selenium / WebDriver ?
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Created by Amol Chavan on 9/19/2016.
*/
public class PrivateBrowsing {
public static void main(String args){
createInstance();
}
public static WebDriver createInstance(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
System.setProperty("webdriver.ie.driver","C:\Grid\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get("http://www.google.com");
return driver;
}
}
answered Nov 22 at 2:49
Deepak-MSFT
53316
53316
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
add a comment |
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
The DesiredCapabilities are deprecated (v3.141.0 SeleniumWebdriver) and there is no Force_Create_Process or IE_Switches. Also the IWebDriver doesn't take any capabilities as input.
– Basil Fuchs
Nov 22 at 13:09
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
I will try to search and try to provide you any other solution or work around to solve the issue. thanks for your understanding.
– Deepak-MSFT
Nov 23 at 6:01
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409851%2fopen-internet-explorer-in-private-mode-with-selenium%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown