Welcome, this is a fast guide for setting up Selenium environment within Eclipse.
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.
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.
- install Git as our source control tool.
- install Java SDK
- download Maven
- Follow the Maven installation guide
- Open a new terminal and test that maven works with the following command: mvn -version
- Install Chrome
- 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
- This is designed to be ran from within a Eclipse.
##Running the Test Application
- Checkout from git.
git clone https://github.com/dfoulkes/SimpleSelenium.git
You should now have the project imported into Eclipse, the file structure should look something like:
- In the terminal navigate to the path of the pom.xml file and execute the following:
mvn clean install
- To run the application choose one of the executable classes in the com.foulkes.selenium.runMe package right click and select Run Application
##Key Notes
- 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";