如何升级/更新现有Selenium Java项目的Selenium版本? [英] How to upgrade/update Selenium version of an existing Selenium Java project?

查看:97
本文介绍了如何升级/更新现有Selenium Java项目的Selenium版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 11 OS上有一个带有Eclipse IDE的Selenium WebDriver项目.我想将Java客户端驱动程序从2.24升级到2.25.我该怎么办?

I have a Selenium WebDriver project with eclipse IDE on Ubuntu 11 OS. I want to upgrade the java client driver from 2.24 to 2.25. How can I do this?

推荐答案

我从selenium网站(2.25.0)下载了Java客户端驱动程序. http://seleniumhq.org/download/.将zip文件解压缩到您选择的目录中.

I downloaded the java client driver from the selenium website (2.25.0) http://seleniumhq.org/download/ . Unpack the zip file to the dir of your choice.

启动Eclipse并选择您正在处理的项目.通过转到属性"->"Java构建路径"->添加外部JAR",将最新的硒罐添加到引用的库中(选择硒罐).为了以一种干净的方式处理事务,我删除了对其他lib的引用以及旧的selenium(2.24),并用新版本替换了它们.您可以在selenium-2.25.0/libs文件夹下找到新的jar.以与添加selenium-2.25.0.jar相同的方式添加它们.

Start-up eclipse and select the project you are working on. Add the latest selenium jar to the referenced lib by going to Properties->Java Build Path->Add External JARs (select the selenium jar). To do things in a clean way I removed the references to the other libs that had been there along with the older selenium (2.24) and replaced them with the new versions. You can find the new jars under selenium-2.25.0/libs folder. Add them the same way you added selenium-2.25.0.jar.

注意:如果您未正确添加jar文件,这将破坏您的项目,因此您可能要创建项目的备份.

Note: This will break your project if you don't add the jar files correctly so you may want to create a backup of your project.

这篇关于如何升级/更新现有Selenium Java项目的Selenium版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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