Selenium WebDriver Java Framework Course Limited Time Offer for $20

Selenium WebDriver Java Framework Course Limited Time Offer for $20

 

Print

How to use Java Client Driver

When automating test cases with Selenium Java Client Driver, you need to follow the steps below.

  • Extract selenium-java-<version-number>.jar file
  • Open your desired Java IDE (Eclipse, NetBeans, IntelliJ, Netweaver, etc.)
  • Create a java project.
  •  Add the selenium-java-<version-number>.jar files to your project as references.
  •  Add to your project classpath the file selenium-java-<version-number>.jar.
  •  From Selenium-IDE, export a script to a Java file and include it in your Java project, or write your Selenium test in Java using the selenium-java-client API.
  • You can either use JUnit, or TestNg to run your test, or you can write your own simple main() program.
  •  Run Selenium server from the console.
  •  Execute your test from the Java IDE or from the command-line.