【问题标题】:https webpage not opening unless its trusted in ie8除非在 ie8 中受信任,否则 https 网页不会打开
【发布时间】:2014-06-13 14:34:17
【问题描述】:

我在 selenium webdriver 的帮助下开发了一个 java 桌面应用程序(jar)。它的基本作用是在这种情况下 ie8 在 webbrowser 中打开一个网页(https)并进行一些表单发布。但它无法在 ie 中打开网页(https),除非我将站点添加到 ie 的信任站点区域中。我在其他浏览器firefox和chome上试过,没有问题,没有tursting问题,网页直接打开很轻松。为什么在internetexplorer中会这样?为什么我必须信任 ie 中的网站?

请帮忙。提前致谢

【问题讨论】:

  • 您的服务器配置是什么?您是否直接访问应用程序服务器?你有负载均衡器或网络服务器吗?
  • 是的,我直接访问应用服务器
  • 可以在应用服务器控制台查看部署的地址吗?
  • 地址没有问题。是什么原因在我将服务器地址添加到信任区后才打开..请告诉

标签: java internet-explorer selenium webdriver trust


【解决方案1】:

在浏览器调用中,您可以添加以下代码。因此,任何证书弹出窗口都将被接受

 if (sBrowserName.equals("IE")) {
            File file = new File(sBrowserDriver);
            System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
            DesiredCapabilities capab = DesiredCapabilities.internetExplorer();
            capab.setCapability(
                    InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,
                    true);
            webdriver = new InternetExplorerDriver(capab);

【讨论】:

  • introduction_flakiness_by_ignoring_security_domains 功能是否用于忽略保护模式设置?我已经设置好了,这个只会忽略保护模式异常
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-08-14
  • 1970-01-01
  • 1970-01-01
  • 2023-03-15
  • 1970-01-01
  • 1970-01-01
  • 2019-12-29
相关资源
最近更新 更多