我需要实现 selenium Ie WebDriver
,使其成为一个新的 Internet Explorer。
否则它不会访问我的用户帐户, 这意味着它将无法访问 cookie、临时 Internet 文件或历史记录
我在使用 InternetExplorerDriver
时误以为是
它正在使用我的 Windows 帐户的信息,例如历史记录等?
最佳答案
这是我能找到的,仍然需要获得启动新 IE9 session 的选项 但解决了如何正确初始化的问题。
public IWebDriver WebDriver;
var ieDir = Path.Combine(path, "bin");
var opts = new InternetExplorerOptions();
opts.IgnoreZoomLevel = true;
if (counter < 1) //or in most other cases - (WebDriver==null)
{
CleanBr(); // found a solution to programatically delete Browser history
// so i still need to find the resolution for options with starting fresh IE profile
// an IE driver without a user data...
WebDriver = new InternetExplorerDriver(ieDir, opts);
}
INavigation nav = WebDriver.Navigate();
nav.GoToUrl(url);
关于c# - selenium ie webdriver 没有我的用户配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17389006/