1

I need help!

I have thoroughly studied selenium IDE and now I want to proceed with coding using selenium(scripting), how and where should I start.

I have setup complete environment settings with eclipse but do not have an idea how I should start scripting.

I don't have any projects officially allotted for the same, I want to do it on my own.

2

I assume that you set selenium properly.

1 - Go to your eclipse.

2 - Go to menu File ->New -> Java project. Give project name like "test" or anything you like.

3 - Click on Next.

4 - Select tab "Libraries" , Select option "Add external JARs"

5 - Add following 3 JARs :

  A- selenium-java-2.43.1
  B- selenium-java-2.43.1-srcs
  C- selenium-server-standalone-2.39.0

6 - click on Finish. [Your project creation steps completed here]

7 - Now , Do right click on your project folder and select new->class

8 - Give class name and tick option "public static void main(String[] args]"and click on finish.

Please add below code before your classname in code :

 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.firefox.FirefoxDriver;

After above step , run following sample selenium web driver code to open site :

    WebDriver driver = new FirefoxDriver();
    driver.get("https://www.google.com");

Hope above will help you better.

Other selenium helpful tutorial : Selenium Tutorial

  • Thanks a lot @HelpingHands this was really helpful, but what I really wanted to know is what should i start with, like script for opening mail or counting no of broken links etc or something else what would be easier to start with. As we start with a hello world program while learning some language – ashu Dec 23 '14 at 12:10
  • The link provide is really gud – ashu Dec 23 '14 at 12:11
  • First you should learn all methods of selenium then you can start to use one by one in program. Methods are important. Once you use my shared tutorial , you will see learning sequence. – Helping Hands Dec 23 '14 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.