jaga6040 / SimpleSelenium-1

a simple selenium to demonstrate test automation written in Java application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Selenium

Welcome, this is a fast guide for setting up Selenium environment within Eclipse.

What is Selenium?

as seen on thier website

Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

Who is this for?

I am trying to keep this guide as simple as possible so to remain accessible to people of all levels of development experience, however this is not a guide on how to code in java so if you've never seen any C syntax programming language before then it may be quite difficult.

Installation Instructions

  1. install Git as our source control tool.
  2. install Java SDK
  3. download Maven
  4. Follow the Maven installation guide
  5. Open a new terminal and test that maven works with the following command: mvn -version
  6. Install Chrome
  7. We will be using webDriver to communicarte with Chrome, their is a binary supplied in the resources folder src/main/resources place the chromedriver in the following directory:
   cd SimpleSelenium
   mkdir -p /sel/driver
   cp ./src/main/resources/drivers/chromedriver /sel/driver
   chmod +x /sel/driver/chromedriver
  1. This is designed to be ran from within a Eclipse.

##Running the Test Application

  1. Checkout from git.
git clone https://github.com/dfoulkes/SimpleSelenium.git
  1. Import the project into Eclipse
    1. File, import alt text
    2. Choose Existing Maven Project. alt text
    3. Click finish.

You should now have the project imported into Eclipse, the file structure should look something like: alt text

  1. In the terminal navigate to the path of the pom.xml file and execute the following:
mvn clean install
  1. To run the application choose one of the executable classes in the com.foulkes.selenium.runMe package right click and select Run Application alt text

##Key Notes

  1. Running in Windows

if you are using Windows you will need to change the path of the Chrome Driver to get it working.

TO DO this in the ChromeSetup.java file change the update the following line replacing Winodws path to the file path of the chromedriver:

Please visit Chrome Driver for detailed instructions on installing Chrome Driver for your OS.

private final String CHROME_DRIVER_LOCATION = "WINDOWS_PATH";

About

a simple selenium to demonstrate test automation written in Java application.

License:Apache License 2.0


Languages

Language:Java 100.0%