session - Webdriver 3.14 IE11:单击打开窗口/弹出窗口的链接/按钮时会话丢失
问题描述
我的 Internet Explorer 选项:
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,我会采用正确的窗口形式:
解决方案
我想这个问题与EnsureCleanSession 属性有关。当将此属性设置为 true 时,它将清除 Internet Explorer 的所有实例的系统缓存,即使是那些在驱动实例启动时已经运行的实例。
推荐阅读
- html - 部分不遵循 div css 规则
- python - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8c in position 119485: invalid start byte (同时将 sqlite3 迁移到 postgreSQL - djangocms)
- html - 是否可以添加 CSS 或设置浏览器默认所需消息的样式?
- heroku - 如何在 Heroku 上与 Strapi CMS 一起部署 Vendure(无头商务)?
- javascript - 查找数组的嵌套对象中是否存在键或值
- spring - 如何仅在受限制的 http 路径上应用安全过滤器
- google-sheets - 在 Google 表格中查找 MAX DATE - 1 DATE
- javascript - 如何在javascript中动态迭代hain数组
- csv - 表单生成器中的 CSV 文件
- javascript - 如何将公用文件夹 .json 文件提取到反应组件中