Failure of the test case after setting up the Maven with selenium

4,521 views
Skip to first unread message

abhishek

unread,
Aug 25, 2011, 11:11:05 AM8/25/11
to Selenium Users
Hi All,

I am very new for selenium and started with selenium 2 with web
driver .As given on the link http://seleniumhq.org/docs/03_webdriver.html#getting-started-with-selenium-webdriver
-- i configured Maven with all the environmental variable setting and
also checked Maven is installed successfully.Now i pasted the given
example of JAVA in notepad and saved example in my project folder
with .java extension....but it showed me 12 errors .........below is
the error that i am getting ----

Please help and let me know the issue .......

Thanks
==================================================================
^
Selenium2Example.java:4: cannot find symbol
symbol : class WebDriver
location: package org.openqa.selenium
import org.openqa.selenium.WebDriver;
^
Selenium2Example.java:5: cannot find symbol
symbol : class WebElement
location: package org.openqa.selenium
import org.openqa.selenium.WebElement;
^
Selenium2Example.java:6: package org.openqa.selenium.firefox does not
exist
import org.openqa.selenium.firefox.FirefoxDriver;
^
Selenium2Example.java:7: package org.openqa.selenium.support.ui does
not exist
import org.openqa.selenium.support.ui.ExpectedCondition;
^
Selenium2Example.java:8: package org.openqa.selenium.support.ui does
not exist
import org.openqa.selenium.support.ui.WebDriverWait;
^
Selenium2Example.java:15: cannot find symbol
symbol : class WebDriver
location: class org.openqa.selenium.example.Selenium2Example
WebDriver driver = new FirefoxDriver();
^
Selenium2Example.java:15: cannot find symbol
symbol : class FirefoxDriver
location: class org.openqa.selenium.example.Selenium2Example
WebDriver driver = new FirefoxDriver();
^
Selenium2Example.java:23: cannot find symbol
symbol : class WebElement
location: class org.openqa.selenium.example.Selenium2Example
WebElement element = driver.findElement(By.name("q"));
^
Selenium2Example.java:23: cannot find symbol
symbol : variable By
location: class org.openqa.selenium.example.Selenium2Example
WebElement element = driver.findElement(By.name("q"));
^
Selenium2Example.java:36: cannot find symbol
symbol : class ExpectedCondition
location: class org.openqa.selenium.example.Selenium2Example
(new WebDriverWait(driver, 10)).until(new
ExpectedCondition<Boolean>() {

^
Selenium2Example.java:36: cannot find symbol
symbol : class WebDriverWait
location: class org.openqa.selenium.example.Selenium2Example
(new WebDriverWait(driver, 10)).until(new
ExpectedCondition<Boolean>() {

^
12 errors
===============================================================

Krishnan Mahadevan

unread,
Aug 25, 2011, 11:55:16 AM8/25/11
to seleniu...@googlegroups.com
When you say you have set up and configured Maven properly, I am also assuming that you created a new Maven project, and within your pom.xml you added up the following as a dependency (http://seleniumhq.org/download/maven.html)

<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.5.0</version>
    </dependency>  

before you went ahead and created the aforementioned test ?

Is that a fair assumption ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"




--
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.


Mark Collin

unread,
Aug 25, 2011, 12:25:32 PM8/25/11
to seleniu...@googlegroups.com

You may want to use selenium-server instead of selenium-java.

 

selenium-server will bring down everything.


-- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify postm...@ardescosolutions.com

Binita

unread,
Aug 26, 2011, 6:45:09 AM8/26/11
to Selenium Users
try this
================================
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0a5</version>
</dependency>
<dependency>

Thanks
Binita
===================================

On Aug 25, 9:25 pm, "Mark Collin" <m...@ardescosolutions.com> wrote:
> You may want to use selenium-server instead of selenium-java.
>
> selenium-server will bring down everything.
>
> From: seleniu...@googlegroups.com
> [mailto:seleniu...@googlegroups.com] On Behalf Of Krishnan Mahadevan
> Sent: 25 August 2011 16:55
> To: seleniu...@googlegroups.com
> Subject: Re: [selenium-users] Failure of the test case after setting up the
> Maven with selenium
>
> When you say you have set up and configured Maven properly, I am also
> assuming that you created a new Maven project, and within your pom.xml you
> added up the following as a dependency
> (http://seleniumhq.org/download/maven.html)
>
> <dependency>
>         <groupId>org.seleniumhq.selenium</groupId>
>         <artifactId>selenium-java</artifactId>
>         <version>2.5.0</version>
>     </dependency>  
>
> before you went ahead and created the aforementioned test ?
>
> Is that a fair assumption ?
>
> Thanks & Regards
> Krishnan Mahadevan
>
> "All the desirable things in life are either illegal, expensive, fattening
> or in love with someone else!"
>
> On Thu, Aug 25, 2011 at 8:41 PM, abhishek <abhishe.b...@gmail.com> wrote:
>
> Hi All,
>
> I am very new for selenium and started with selenium 2 with web
> driver .As given on the linkhttp://seleniumhq.org/docs/03_webdriver.html#getting-started-with-sel...
> ebdriver
> <mailto:selenium-users%2Bunsu...@googlegroups.com> .
> For more options, visit this group athttp://groups.google.com/group/selenium-users?hl=en.
>
> --
> 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 athttp://groups.google.com/group/selenium-users?hl=en.
>
> --
> This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
>
> If you have received this email in error please notify postmas...@ardescosolutions.com

Mark Collin

unread,
Aug 26, 2011, 6:51:44 AM8/26/11
to seleniu...@googlegroups.com
Please don't try that, it's using the alpha 5 version which is very out of
date and an old artefact id that is no longer supported. The current
depedancy you should be using is either:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.5.0</version>
</dependency>

or

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.5.0</version>
</dependency>

The first one will bring down everything, the second just the client driver
files.

This information is available at http://seleniumhq.org/download/maven.html.

Thanks
Binita
===================================

If you have received this email in error please notify postm...@ardescosolutions.com

Krishnan Mahadevan

unread,
Aug 26, 2011, 8:00:46 AM8/26/11
to seleniu...@googlegroups.com
Version 2.0a5 is a very old version.
Please use 2.5.0 instead

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



Reply all
Reply to author
Forward
0 new messages