Chromedriver - 未授予IE Tab权限

问题描述 投票:0回答:2

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

enter image description here

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

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

我clik允许,什么都不会发生。正确测试应该在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);
}

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

selenium internet-explorer selenium-webdriver google-chrome-extension selenium-chromedriver
2个回答
0
投票

企业版IE标签包含必须由最终用户手动启用的权限。 Read more here

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

企业客户请通过[email protected]与我们联系,了解如何自动部署这些设置。


0
投票

我们没有看到的是您正在“驾驶”的网页。

您看到的弹出窗口来自IE Tab api,它必须首先调用window.ietab.requestAccess并在调用window.ietab.openWithIETab之前等待结果。

您看到的错误是因为该页面名为window.ietab.openWithIETab,而不等待requestAccess的响应形式。

因此,网页可能在不等待requestAccess的结果的情况下调用两个调用,可能是因为开发人员已经允许访问,因此他们不知道此弹出窗口正在显示。

© www.soinside.com 2019 - 2024. All rights reserved.