简体   繁体   English

如何在不使用Maven的情况下设置Selenium WebDriver?

[英]How to set up Selenium WebDriver without using Maven?

I am currently working on a very complex Selenium RC framework. 我目前正在研究一个非常复杂的Selenium RC框架。 It was set up before i got to use it by some other guy who is now not reachable. 它是在我现在无法联系到的其他人使用之前设置的。 My plan is to upgrade to WebDriver. 我的计划是升级到WebDriver。 For this i will need to be able to use the old RC API, so i will use RemoteWebDriver. 为此,我将需要能够使用旧的RC API,因此我将使用RemoteWebDriver。 Is there any JAR that i can download that contains everything needed for my plan? 我可以下载任何包含计划所需的一切JAR吗? And what if from now on the new tests that I will rite i want to use FireFoxDriver, IExplorerDriver and Chrome Driver? 如果从现在开始我要使用FireFoxDriver,IExplorerDriver和Chrome Driver进行的新测试该怎么办? What are all the JARs that I need to download, where do i take them from and whow do I set them up correctly? 我需要下载什么所有的JAR,我应该从哪里下载,以及如何正确设置它们?

I always refer to the google code page since i feel more comfortable with it, and also contains always the latest updates. 我总是参考google code页面,因为我对此感到更自在,并且总是包含最新的更新。

http://code.google.com/p/selenium/downloads/list http://code.google.com/p/selenium/downloads/list

Copy-paste from the documentation: 从文档中复制粘贴:

selenium-java-2.20.0.zip selenium-java-2.20.0.zip
The Java bindings for Selenium 2, including the WebDriver API and the Selenium RC clients. Selenium 2的Java绑定,包括WebDriver API和Selenium RC客户端。 Download this if you plan on just using the client-side pieces of Selenium 如果您打算仅使用客户端Selenium,请下载此文件

selenium-server-2.20.0.zip selenium-server-2.20.0.zip
All variants of the Selenium Server: stand-alone, jar with dependencies and sources. Selenium Server的所有变体:独立的,具有依赖项和源的jar。

EDIT Regarding how to set it up, if you are using eclipse 编辑关于如何设置它,如果您使用的是eclipse
right click your project -> click properties -> java build path -> Add external jars 右键单击您的项目->单击属性-> Java构建路径->添加外部jar

A better approach would be using WebDriverBackedSelenium to use goodies of both Selenium and webdriver. 更好的方法是使用WebDriverBackedSelenium来使用Selenium和webdriver的好东西。 This may also reduce your time in upgradation. 这也可以减少您的升级时间。 Sample code: 样例代码:

WebDriver driver = new FirefoxDriver();
Selenium selenium = new WebDriverBackedSelenium(driver, "http://www.yoursite.com");

Best and official link to upgrade smoothly: http://seleniumhq.org/docs/appendix_migrating_from_rc_to_webdriver.html 顺利升级的最佳和官方链接: http : //seleniumhq.org/docs/appendix_migrating_from_rc_to_webdriver.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java Selenium WebDriver-如何在不使用远程WebDriver的情况下设置ScrollBehavior(elementScrollBehavior)? - Java Selenium WebDriver - How to set ScrollBehavior (elementScrollBehavior) without using Remote WebDriver? 如何使用Selenium WebDriver设置请求Cookie? - How to set request cookies using selenium webdriver? 如何使用Selenium Webdriver Eclipse设置测试套件并测试NG - How to set up test suite using selenium webdriver eclipse and test NG 如何使用Maven和JUnit通过Eclipse调试Selenium Webdriver - How to debug selenium webdriver through eclipse using maven and junit 如何在不使用archetype:generate的情况下手动设置Maven的路径? - how to set path of maven manually without using archetype:generate?setting up path for maven java related 使用Selenium Webdriver 2 Maven不会因错误而停止 - Maven does not stop on error using selenium webdriver 2 Selenium WebDriver首先设置了Java示例 - Selenium WebDriver first Java example to set up 如何处理linkedIn授权使用Java在Selenium Webdriver中弹出? - How to Handle linkedIn authorization Pop up in selenium webdriver using Java? 如何使用Selenium Webdriver在带有查找功能的组合框中输入信息? - How to enter information in a combo box with look up using Selenium webdriver? 如何使用Java处理Selenium WebDriver中的弹出窗口 - How to handle Pop-up in Selenium WebDriver using Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM