1

Since most of our clients still use ie8 and ie9, and we switched to Windows 8 OS, which comes with ie10 and due to requests from our clients, we need to test the software on ie8 version. I have a problem switching the ie version to 8, even though ie10 (amazingly) offers ie8 mode.

        System.setProperty(SeleniumProperties.ieDriver, SeleniumProperties.ieLocation);
        DesiredCapabilities ieCapabilities = null;
        ieCapabilities = DesiredCapabilities.internetExplorer();
        ieCapabilities.setVersion("8");
        driver = new InternetExplorerDriver(ieCapabilities);
        System.out.println(((RemoteWebDriver) driver).getCapabilities());

driver capabilities remain unchanged:

Capabilities [{platform=WINDOWS, elementScrollBehavior=0, javascriptEnabled=true, enablePersistentHover=true, ignoreZoomSetting=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=10, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, initialBrowserUrl=, handlesAlerts=true, nativeEvents=true, browserAttachTimeout=0, takesScreenshot=true}]

any kind of work around this would be greatly appreciated!

4

1 に答える 1

2

InternetExplorerDriver を使用してブラウザ エミュレーション モードを設定することはできません。単にサポートされていません。IE 8 がインストールされた仮想マシンを使用します。

于 2013-06-14T20:39:47.417 に答える