Failed Setting Up a WebDriver Project Following The Documentation

2,225 views
Skip to first unread message

rocketsue

unread,
Jul 25, 2011, 4:55:29 AM7/25/11
to Selenium Users
Hey guys,

I am completely new to Java & Testing. The latest Selenium-release
made me want to try everything for our current project :) So I
followed the instructions from http://seleniumhq.org/docs/03_webdriver.html,
installed Maven, installed IntelliJ and executed the steps to setting
up a new project.
I followed the example 1:1, when trying to run the example code
IntelliJ threw me errors like "cannot find symbol class WebDriver",
"package org.openqa.selenium.firefox does not exist" and "cannot find
symbol variable By".

What did I do wrong?

Tarun Bhadauria

unread,
Jul 25, 2011, 7:09:05 AM7/25/11
to seleniu...@googlegroups.com
I don't use maven but was selenium-java jar file downloaded to your system?
Can you download Selenium-Server-Standalone jar from here - http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.1.0.jar&can=2&q=
add to your project and try executing it once again

~tarun
http://seleniumsoftwaretesting.blogspot.com/

rocketsue

unread,
Jul 25, 2011, 7:23:57 AM7/25/11
to Selenium Users
added the .jar to dependencies, still get the same errors.

as a java newbie, I have to ask: does it matter where in the project
structure I placed my .java-file? or how I call the package inside
the .java-file (p.e. org.openqa.selenium.example)?

thank you for your help!

On 25 Jul., 13:09, Tarun Bhadauria <tkum...@gmail.com> wrote:
> I don't use maven but was selenium-java jar file downloaded to your system?
> Can you download Selenium-Server-Standalone jar from here -http://code.google.com/p/selenium/downloads/detail?name=selenium-serv...

Luke Inman-Semerau

unread,
Jul 25, 2011, 11:18:45 AM7/25/11
to seleniu...@googlegroups.com
First make sure you're only including on of the dependencies list here:
http://seleniumhq.org/download/maven.html

To make sure your maven works before integrating with IDEA, try running maven command line in your project 'mvn compile'. If that passes, then you can move on to IntelliJ (which I don't use, so not much help there)

-Luke

> --
> You received this message because you are subscribed to the Google Groups "Selenium Users" group.
> To post to this group, send email to seleniu...@googlegroups.com.
> To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
>

Tarun Bhadauria

unread,
Jul 25, 2011, 12:52:16 PM7/25/11
to seleniu...@googlegroups.com
hmmmmm you import the package to be able to used it.
In eclipse I create a lib folder and use build path > configure build path.
I suggest you to be aware of core java, this would help you in working with java client driver of Selenium.

~tarun

rocketsue

unread,
Jul 25, 2011, 12:51:02 PM7/25/11
to Selenium Users
Sounds promising, I'm trying that tomorrow. Although I never worked
with Maven before, it sounded promising.

Looks like my problem really lies in between Maven and Idea, as I
tried creating a new project w/o Maven and it worked - just by
providing Idea with the two dependencies you stated. I'm thrilled :)
thanks so far Luke and tarun!


On Jul 25, 5:18 pm, Luke Inman-Semerau <luke.seme...@gmail.com> wrote:
> First make sure you're only including on of the dependencies list here:http://seleniumhq.org/download/maven.html
>
> To make sure your maven works before integrating with IDEA, try running maven command line in your project 'mvn compile'. If that passes, then you can move on to IntelliJ (which I don't use, so not much help there)
>
> -Luke
>
Reply all
Reply to author
Forward
Message has been deleted
0 new messages