简体   繁体   English

如何在Eclipse中将WebDriver与Java结合使用

[英]How to use WebDriver with Java in eclipse

I am using Selenium RC, TestNG, Java with Eclipse. 我在Eclipse中使用Selenium RC,TestNG,Java。 I want to use WebDriver. 我想使用WebDriver。

How can I use it? 如何使用? Which jar file will be added in eclipse as external jar file? 哪个jar文件将作为外部jar文件添加到eclipse中?

Download the selenium-java zip and add all the Jars in the lib dir to your classpath. 下载selenium-java zip并将lib目录中的所有Jars添加到您的类路径中。 This will contain the WebDriver API and all the available browser Drivers such as Firefox, HTMLUnit, Chrome, etc. 这将包含WebDriver API和所有可用的浏览器驱动程序,例如Firefox,HTMLUnit,Chrome等。

Please look at my step by step guide at http://scraping.pro/how-to-use-selenium-webdriver-with-java/ . 请在http://scraping.pro/how-to-use-selenium-webdriver-with-java/中查看我的逐步指南。 It explains how to build a java program that uses WebDriver using Eclipse IDE. 它说明了如何使用Eclipse IDE构建使用WebDriver的Java程序。

With WebDriver + Java + TestNG + Maven + ReportNG + Sikuli you can make an automation framework which is user friendly, robust, maintainable and scalable. 使用WebDriver + Java + TestNG + Maven + ReportNG + Sikuli,您可以创建一个用户友好,健壮,可维护和可扩展的自动化框架。 Tools, strategies and patterns that I used are explained in detail at http://xebee.xebia.in/2012/03/30/web-gui-automation-tools-strategies-patterns/ 我使用的工具,策略和模式在http://xebee.xebia.in/2012/03/30/web-gui-automation-tools-strategies-patterns/中有详细说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM