Coder Social home page Coder Social logo

selenium-scripts's Introduction

IMPLEMENTING CONTINUOUS MONITORING OF COMMERCIAL WEBSITE USING SELENIUM & MAVEN

/********** @author – Saurabh Jain @Date – 1st Feb, 2013 @Company – Shopclues **********/

→ Steps to configure selenium and maven in eclipse : 1.) Install eclipse for J2EE development and then go to help->install new software-> work with 'ADD THE LOCATION OF THE SOFTWARE TO BE DOWNLOADED'-> click on Add button and then select all the required packages and then follow the procedure after clicking on next button.

http://beust.com/eclipse - testng → http://eclipse.org/m2e-wtp/download/ or
http://download.eclipse.org/technology/m2e/releases - maven

  1. Now install the maven in the system using the steps given in the following link - http://maven.apache.org/download.cgi

  2. Download the following packages from this site- http://seleniumhq.org/download/ → selenium client driver for java → selenium server

  3. Now create a new maven project in eclipse by going to file → new → others → maven → maven project .

  4. Now open the pom.xml in the project just created above and add the dependency corresponding to each external package that you are going to import in your java program. Add the following dependencies in your pom.xml :- → group id - org.testng , artifact id - testng → group id – javax.mail artifact id - mail → group id – javax.activation artifact id - activation → group id – org.seleniumhq.selenium artifact id - selenium-java → group id – org.seleniumhq.selenium artifact id – selenium-parent

  5. go to package explorer and look for your project and then maximize this dir. Src/test/java and rename the default file – AppTest.java . To rename it, right click on this and go to refractor and rename it with the file name you want followed by Test keyword . Then click on finish it.

  6. Right click on the maven project in the package explorer and then go to properties → build path → libraries .

  7. Click on the add external jars/zips and then add the following packages - → selenium-java-2.28.0-zip → selenium-server-standalone-2.28.0.jar → testng-6.8.zip → javamail-1.4.5/mail.jar → jaf-1.1.1/activation.jar

  8. In order to run the maven project, first go to the folder where selenium-server-standalone-2.28.0.jar is located and then type the following bash command- → java -Dwebdriver.chrome.driver=/home/saurabh/chromedriver -jar selenium-server-standalone-2.28.0.jar. To download this driver , go to http://code.google.com/p/chromedriver/downloads/list and unzip this file.

  9. To build the maven project, go to the directory where your maven project is located through terminal . After navigating into it, you will see a pom.xml file. Now, type the following command in the terminal – mvn clean test .

selenium-scripts's People

Contributors

saurabhskj avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.