问题描述
我正在使用IE11和Selenium 3.13进行自动化测试,并且正在测试IEDriverServer
的不同版本,但是每个版本都有一个bug.我想要一个稳定的版本,以将IEDriverServer
与IE11和Selenium 3.13
I am automating tests with IE11 and Selenium 3.13 and I was testing different version of IEDriverServer
but every version has a bug. I want a stable version to combine IEDriverServer
with IE11 and Selenium 3.13
我正在使用以下代码启动该应用程序:
I'm using this code to launch the application:
private static WebDriver setRemoteDriver(Map<String, Object> selConfig) {
String browser = System.getProperty("browser", selConfig.get("browser").toString());
capabilities = new DesiredCapabilities();
capabilities.setJavascriptEnabled(true);
if (browser.equalsIgnoreCase("firefox")) {
capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, getFirefoxProfile());
capabilities.setCapability("pageLoadStrategy", "normal");
} else if (browser.equalsIgnoreCase("chrome")) {
capabilities = DesiredCapabilities.chrome();
} else if (browser.equalsIgnoreCase("Safari")) {
capabilities = DesiredCapabilities.safari();
} else if ((browser.equalsIgnoreCase("ie")) || (browser.equalsIgnoreCase("internetexplorer"))
|| (browser.equalsIgnoreCase("internet explorer"))) {
capabilities = DesiredCapabilities.internetExplorer();
} else {
System.out.println("Please correct Browser specify in YAML file : " + browser);
capabilities = DesiredCapabilities.firefox();
}
try {
url = new URL(System.getProperty("ipaddress", getYamlValue("selenium.remote.host")));
} catch (MalformedURLException e) {
e.printStackTrace();
}
return new RemoteWebDriver(url, capabilities);
}
用于 IE11 和 Selenium 的
推荐答案
IEDriverServer 应该始终相同.按照最佳做法,您应该始终使用最新的GA版本,而某些组织倾向于只选择主要的GA版本.
IEDriverServer for IE11 and Selenium should always be identical.As per best practices you should always use the recent GA version while some organizations tends to prefer the major GA releases only.
例如:
- 对于 Selenium v3.14.0 ,您应始终使用 IEDriverServer v3.14.0
- For Selenium v3.14.0 you should always use IEDriverServer v3.14.0
- 在某些特殊情况下,可能会有次要的 Selenium 版本,您需要使用主要版本的 IEDriverServer .举个例子:
- 对于 Selenium v3.141.0 , Selenium v3.141.5 和 Selenium v3.141.59 ,您应始终使用 IEDriverServer v3.141.0 .
- In some exceptional cases there may be minor Selenium releases where you need to use the IEDriverServer from the major release. As an example:
- For Selenium v3.141.0, Selenium v3.141.5 and Selenium v3.141.59 you should always use IEDriverServer v3.141.0 only.
对于 Selenium v3.13.0 ,您应始终使用 IEDriverServer v3.13.0
这篇关于IE11和Selenium 3.13的IEDriverServer的兼容版本是哪个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!