Open Internet Explorer in Private Mode with Selenium
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 |
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 |
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 '18 at 10:18
Basil FuchsBasil Fuchs
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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 '18 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 '18 at 6:01
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 '18 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 '18 at 6:01
add a comment |
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 '18 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 '18 at 6:01
add a comment |
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 '18 at 2:49
Deepak-MSFTDeepak-MSFT
974116
974116
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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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.
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