Java+eclipse+selenium Environment Construction

Source: Internet
Author: User

These days learning selenium, big head shrimp me. Installation environment or encountered a lot of problems, hurry to record. or next time ... ("Selenium2 Java Automation Test Practice"), just write and deepen your impressions.

  1. Install Java

Visit the Java website to download the JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html download the version you need, I'm using Jdk-8u101-windows-x64.exe now.

  Java Environment Sub-JDK and JRE,JDK is Java development Kit. The JDK is a developer-oriented SDK that provides a Java development environment and a running environment. The JRE is the Java runtime Eneiroment, which is the Java Runtime Environment and is intended for Java program users.

Java installation The next step is just fine. installation directory is optional

Click Close when the installation is complete. Then configure the environment variables:

My Computer/Computer right-click menu---> Properties---> Advanced system settings---> Environment variables---> system Variables (when I set environment variables, I always configure Java_home and Class_path in the user variables, So it's been in CMD. Javac always prompt is not an internal command or an external command ... )

1) New

Variable name: java_home

Variable Value: C:\Program files\java\jdk1.8.0_101\

Variable name: Class_path

Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;

2) Locate the PATH variable name---> Edit add:

Variable name: PATH

Variable value:%java_home%\bin;%java_home%\jre\bin;

3) After configuring the environment variables, you can verify that Java is successful at the Windows command prompt:

  2. Install Eclipse

Eclipse Download: http://www.eclipse.org/downloads/

Unzip the downloaded file to get an Eclipse directory:

Double-click Eclipse Launcher. You need to specify the project directory for Java, or the directory where you want the Java project to be created. I wrote D:\project.

Installation successful, boot is such a welcome interface

  3, installation Selenium

We need to install the Java version of the selenium, the download method to resolve itself. = =

Unzip it, that's it.

Let's see HelloWorld first.

Enter the project name and finish directly. If you want to see the next step of creating a project what can be next

Package concept can be understood as a collection of programs

Create Class

OK, we're out of Hello world.

On the created project, right-click Build Path--->add Libraries ...

Then the user library then next---"User Libraries ...

Create a library directory, the name of the random

Import these jar packs in.

The JAVA+ECLIPSE+SELENIUM2 environment is set up, and then we can write an automated script. Good study Day Day up

Java+eclipse+selenium Environment Construction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.