0

I have downloaded "selenium-java-2.5.0" and added it to the build path of my project in eclipse, but when I try to utilize one of the new API's I get a syntax error.

Is there a tutorial for installing the selenium-java-2.5.0 in eclipse?

David Cunningham
  • 957
  • 2
  • 12
  • 22
  • I have already goggled and found nothing, specific. what really want to know is has anybody had this problem before. – David Cunningham Aug 30 '11 at 09:36
  • That should be all you have to do. Hit Ctrl-Shift-O to make sure it's imported the right classes when you wrote your code. – Mike Kwan Aug 30 '11 at 09:37
  • Are you sure you don't need selenium-server-2.5.0? With a question that doesn't even mention what syntax error you are getting, I'll be surprised you can get very far. – Vineet Reynolds Aug 30 '11 at 10:11
  • the syntax is mentioned in this earlier posting http://stackoverflow.com/questions/7178029/selenium-webdriver-the-method-alert-is-undefined-for-the-type-webdriver-target since I got no response to this post I thought I was asking the wrong question and that I need to look at installing selenium 2 – David Cunningham Aug 30 '11 at 12:17
  • apologies for the re-posting. something happened to my browser and I could not edit or remove the old post – David Cunningham Aug 30 '11 at 12:21

4 Answers4

0

You will need all the .jar files in selenium ZIP. Copy selenium-java-2.xx.jar and all the jars from libs folder (in selenium ZIP) to your project.

If you really need a tutorial about this, look here: Selenium Java Tutorial

filip_j
  • 993
  • 1
  • 14
  • 22
0

I would suggest create a pom.xml file and add the maven dependencies to the file and refresh the project. Then the required dependencies and jar are automatically installed. you can also add jar according to your requirement by going to the link.

https://mvnrepository.com/

because adding jar separately might lead to any flows.

TinTin
  • 201
  • 1
  • 8
  • 19
0

The issue was that old jars were still conflicting with eclipse, removed old jars re-added fresh ones

David Cunningham
  • 957
  • 2
  • 12
  • 22
-1

If you want setup Selenium Environment,

1) Download and Install Java Software (JDK) - create and execute programs / Test scripts

2) Set Environment Variable path (Path Variable) - To use Java from any directory

3) Download Eclipse IDE and Extract - To write and execute Java Programs

4) Download Selenium WebDriver Java Language binding (from www.seleniumhq.org) and Add Webdriver jar files to Java Project in Eclipse IdE

5) Download Browser driver/s and (* set browser driver path in Test cases...)