如何实例化InternetExplorerDriver-Selenium 2的不同版本? [英] How to instantiate different versions of InternetExplorerDriver - Selenium 2?

查看:96
本文介绍了如何实例化InternetExplorerDriver-Selenium 2的不同版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道如何实例化InternetExplorerDriver的不同版本.

just wondering how I can instantiate different versions of InternetExplorerDriver.

这就是我创建IE驱动程序的方式:

That's how I can create a IE driver:

WebDriver ieWebDriver = new InternetExplorerDriver();

但是我无法区分IE6,IE7,IE8和IE9.

but I am not able to differentiate between IE6, IE7, IE8 and IE9.

干杯

推荐答案

Windows仅支持安装单个IE版本.尽管存在一些可以运行多个版本的黑客,但我敢肯定您不会让它们与WebDriver一起使用(尽管我很乐意被证明是错误的).

Windows only supports installing a single IE version. Although some hacks exist to run multiple versions, I'm pretty sure you won't get them working with WebDriver (although I'd love to be proven wrong).

在您的鞋中,我可能会为要测试的每个版本设置一个Windows VM,并使用RemoteWebDriver与之交谈.

In your shoes, I would probably set up a Windows VM for each version you want to test and use RemoteWebDriver to talk to them.

这篇关于如何实例化InternetExplorerDriver-Selenium 2的不同版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆