[英]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.