Session Webdriver 3.14 IE11:单击打开窗口/弹出窗口的链接/按钮时会话丢失
我的Internet Explorer选项:Session Webdriver 3.14 IE11:单击打开窗口/弹出窗口的链接/按钮时会话丢失,session,modal-dialog,webdriver,popup,internet-explorer-11,Session,Modal Dialog,Webdriver,Popup,Internet Explorer 11,我的Internet Explorer选项: var optionsIE = new InternetExplorerOptions(); optionsIE.IntroduceInstabilityByIgnoringProtectedModeSettings = true; optionsIE.EnsureCleanSession = true; string IE_DRIVER_PATH = SolutionDirectory + @"\\
var optionsIE = new InternetExplorerOptions();
optionsIE.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
optionsIE.EnsureCleanSession = true;
string IE_DRIVER_PATH = SolutionDirectory + @"\\..\\packages\\Selenium.WebDriver.IEDriver.3.14.0\\driver\\";
InternetExplorerDriverService service =
InternetExplorerDriverService.CreateDefaultService(IE_DRIVER_PATH);
service.Port = port;
driver = new InternetExplorerDriver(service, optionsIE);
单击打开模式弹出窗口的链接/按钮时,新窗口上需要登录e密码(无正常密码):
而我期待另一个结果窗口
如果使用ff61,则采用正确的窗口形式:
我想这个问题与我有关。
当将此属性设置为true时,它将清除Internet Explorer所有实例的系统缓存,即使是在启动受驱动实例时已经运行的实例。问题是由于命令行–用于启动IE的noframemerging 实际上,此参数设置多个进程之间的IE会话。 当我点击打开弹出窗口的按钮时,一个新的进程已经创建。 如果我在同一个手动测试中使用IE,我只需要两个过程 我试着设置
ForceCreateProcessApi = true,
BrowserCommandLineArguments = "-framemerging"
但它不起作用。为了防止Internet Explorer将新的框架进程合并到新的系统进程中,解决方法是通过注册表项设置此选项:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FrameMerging\(DWORD)00000000
当该值设置为(DWORD)0000000 1时,该功能启用,当该值为(DWORD)00000000时,该功能禁用。默认情况下,它处于启用状态。当您在下面的行中添加注释时会发生什么?选项sie.EnsureCleanSession=true@Selcuk Ayhan,@Dillion:当我删除此指令时,相同的弹出窗口显示相同的消息:
options sie.EnsureCleanSession=true代码>