Chromedriver-未授予IE Tab权限

时间:2019-04-05 10:33:41

标签: selenium internet-explorer selenium-webdriver google-chrome-extension selenium-chromedriver

我正在测试Web应用程序。在测试中,我检查客户数据。要使用此测试,我需要chromedriver中的IE Tab。我正在使用IETab正确初始化chromedriver。该页面显示后,弹出式窗口下面

enter image description here

在控制台中出现弹出窗口后,我在下面的日志中看到:

未捕获的IETABAPI错误:未授予权限。您必须调用window.ietab.requestAccess才能使用IE Tab Api。

我轻按“允许”,什么都不会发生。正确测试应在chromedriver中打开新书签。在我用IETab执行chromedriver的代码下面。

default void ChromeExtensionIETab() {
    ChromeOptions options = new ChromeOptions();
    options.addExtensions(new File("C:\\Users\\user\\Dysk Google\\all\\testowanie\\chromedriver_win32\\extension_12_4_4_1.crx"));
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    options.addArguments("--use-fake-ui-for-media-stream");
    System.setProperty("webdriver.chrome.driver", "C:\\Users\\user\\Dysk Google\\all\\testowanie\\chromedriver_win32\\chromedriver.exe");
    setDriver(new ChromeDriver(options));
    getDriver().get("https://api-test/");
    getDriver().manage().window().maximize();
    getDriver().manage().timeouts().implicitlyWait(18, TimeUnit.SECONDS);
}

有人可以解释我该怎么办?

2 个答案:

答案 0 :(得分:0)

企业版IE选项卡包含权限,否则最终用户必须手动启用这些权限。 Read more here

如果已安装IE Tab: Click here to allow IE Tab to access https:// URLs and file downloads

企业客户请通过support@ietab.net与我们联系,以发现如何自动部署这些设置。

答案 1 :(得分:0)

我们看不到您正在“开车”的网页。

您看到的弹出窗口来自IE Tab API,它必须先调用window.ietab.requestAccess并等待结果,然后再调用window.ietab.openWithIETab。

您看到的错误是因为名为window.ietab.openWithIETab的页面没有等待响应表单requestAccess。

因此,该网页可能正在调用这两个调用,而没有等待requestAccess的结果,这可能是因为开发人员已经允许访问,所以他们不知道此弹出窗口是否正在显示。

相关问题