Compilation Error: cannot find symbol

1,512 views
Skip to first unread message

sabf

unread,
Jul 26, 2011, 9:42:52 AM7/26/11
to seleniu...@googlegroups.com
Hi,

i got this exception:

de/edict/portal/registration/RegistrationHelper.java:[257,78] cannot find symbol
symbol  : method setSelected()
location: interface org.openqa.selenium.WebElement

this is the line of code:
driver.findElement(By.id("registration_termsAndNationalityCheck")).setSelected();

my pom.xml settings are:
<dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium</artifactId>
            <version>2.0a5</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-common</artifactId>
            <version>2.0b1</version>
           <!-- <type>jar</type> -->
        </dependency>
Can anyone help me?

Krishnan Mahadevan

unread,
Jul 26, 2011, 9:46:55 AM7/26/11
to seleniu...@googlegroups.com
You are depending on very old version of selenium2. Can you please update your pom with version as 2.2.0 and retry ?

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 view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/WgJYRhhonIQJ.
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.

sabf

unread,
Jul 26, 2011, 9:58:08 AM7/26/11
to seleniu...@googlegroups.com
no i try it with 2.2.0 but i get the same error again
Or should i try all dependency with 2.2.0???
<dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium</artifactId>
            <version>2.0a5</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.2.0</version>

        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-common</artifactId>
            <version>2.0b1</version>
            <type>jar</type>
        </dependency>

Krishnan Mahadevan

unread,
Jul 26, 2011, 9:59:57 AM7/26/11
to seleniu...@googlegroups.com
I think you should depend on the same version number for all the artifacts.


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 view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/AFJf1BdqHW0J.

sabf

unread,
Jul 26, 2011, 10:01:30 AM7/26/11
to seleniu...@googlegroups.com
now i try it with every version 2.2.0.
But now one import will not work:
import org.openqa.selenium.support.ui.Select;

Is there another way to get it?

Krishnan Mahadevan

unread,
Jul 26, 2011, 10:05:04 AM7/26/11
to seleniu...@googlegroups.com
Can you try adding the following and see if that helps ?

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-support</artifactId>
            <version>2.2.0</version>
        </dependency>


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 view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/bqsFKYnNUpYJ.

sabf

unread,
Jul 26, 2011, 10:20:19 AM7/26/11
to seleniu...@googlegroups.com
i try now this configuration, and it works. Thanks for your help.
For the first and the third entry there are no 2.2.0 dependencies, it that right?
<dependency>
            <groupId>org.seleniumhq.selenium</groupId>

            <artifactId>selenium</artifactId>
            <version>2.0a5</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>

            <artifactId>selenium-remote-common</artifactId>
            <version>2.0b1</version>
            <type>jar</type>
        </dependency>

Krishnan Mahadevan

unread,
Jul 26, 2011, 10:25:19 AM7/26/11
to seleniu...@googlegroups.com
Here's where I normally check to see what versions of artifacts are published on the global maven repository.

http://repo1.maven.org/maven2/org/seleniumhq/selenium/

To answer your question :


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 view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/1mZMYwNiyd4J.

sabf

unread,
Jul 26, 2011, 10:35:16 AM7/26/11
to seleniu...@googlegroups.com
thank you krishan for the link.

Mark Collin

unread,
Jul 26, 2011, 11:11:32 AM7/26/11
to seleniu...@googlegroups.com

Selenium is deprecated you need to use selenium-server to get everything now (You can use selenium-java if you are not planning on starting a selenium server up).  The latest version in the maven repo is 2.1.0, a working POM entry is shown below:

 

<dependency>

            <groupId>org.seleniumhq.selenium</groupId>

            <artifactId>selenium-server</artifactId>

            <version>2.1.0</version>

</dependency>

 

All of this information is available on seleniumHQ:

 

http://seleniumhq.org/download/maven.html


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

Luke Inman-Semerau

unread,
Jul 26, 2011, 11:54:02 AM7/26/11
to seleniu...@googlegroups.com
2.2.0 is in the maven central repo now... The seleniumhq site will be updated momentarily...

Mark Collin

unread,
Jul 27, 2011, 6:21:30 AM7/27/11
to seleniu...@googlegroups.com

Oops, looks like netbeans was caching 2.1.0 as the latest and I missed the announcement that 2.2.0 had hit maven.  I’ve updated to 2.2.0 this morning and all is working fine :)

Reply all
Reply to author
Forward
0 new messages