Selenium+java+eclipse Automated test Environment setup

Source: Internet
Author: User

First, download Java

Windows Java download link https://www.java.com/zh_CN/download/win10.jsp

Second, install Java

After the installation of the environment variables need not be configured, now Java 8 does not have to configure environment variables, directly at the command line input: java-version

  

Third, download and install eclipse

Windows Eclipse Download Link https://www.eclipse.org/downloads/

You can also download the green version

Iv. Download the Selenium and unzip

Selenium Java version download link http://www.seleniumhq.org/download/

  

V. Create the project and add the extracted selenium to the library

File->new->java Project entry name, click Finish

  

Add Library

  

   

Enter the library name

  

  

Click Add External JARs, select Selenium Unzip the file

  

  

Add selenium under Lib folder all files to the library (can be all selected)

  

  

Click OK, click Finish,selenium has been added to the library.

  

Download Selenium browser driver, and copy to the Java installation directory under the Bin folder

Download link or selenium that page

  

  

Seven, the test environment is built successfully

Create a package under the project

  

Enter the package name and click Finish

  

Create a class in a package under a project

  

Enter the class name and click Finish

  

Write a simple automated test script

  

Click Run

  

See if you can adjust the browser, will automatically open Baidu, view a log

  

If the print log is the same as above, congratulations on your successful environment!

  

  

  

Selenium+java+eclipse Automated test Environment setup

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.