如何使用 webdriver 使用不同版本的 firefox? [英] how to use different version of firefox using webdriver?

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

问题描述

如何在 web-driver 中设置 Firefox 版本?我只想使用不同版本的 Firefox.

how to set Firefox version in web-driver? I just want to user different version of Firefox.

喜欢不同的版本 19, 20, 21....

like different version 19, 20 , 21....

请提供一个对其他浏览器也有帮助的通用解决方案.

please provide a generic solution which help for other browser also.

推荐答案

你必须在你的系统上安装所有的版本.然后您可以使用系统属性 webdriver.firefox.bin 来定义 Firefox 的路径.请注意,由于路径是通过系统属性设置的,因此您将无法在同一个 Java 进程中运行两个不同的 Firefox.

You have to install all the versions on your system. Then you can use the System property webdriver.firefox.bin to define the path for Firefox. Note than since the path is set through a System property, you will not be able to run two different Firefox in the same Java process.

此解决方案特定于 Firefox.没有通用的解决方案.您必须自己配置每个 WebDriver.

This solution is specific to Firefox. There is no generic solution. You have to configure every WebDriver yourself.

有关Firefox Web Drvier 配置的更多信息.

这篇关于如何使用 webdriver 使用不同版本的 firefox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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