New to Selenium - cannot access RemoteWebDriver error

4,652 views
Skip to first unread message

Ilyas Patel

unread,
Jul 23, 2011, 10:06:38 AM7/23/11
to Selenium Users
Hello

I'm new to Selenium and I have tried to setup my first Selenium test
using IntelliJ and Selenium 2. I have followed the tutorials on the
official Selenium site but I get this error:

cannot access org.openqa.selenium.remote.RemoteWebDriver
class file for org.openqa.selenium.remote.RemoteWebDriver not
found

This is the tutorial I am using - http://seleniumhq.org/docs/03_webdriver.html#chapter03-reference

This is the location for the Maven setup I followed -
http://seleniumhq.org/docs/appendix_installing_java_driver_Sel20_via_maven.html#importing-maven-into-intellij-reference


Here is the code:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;


public class MyAppHomePageTest {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
}
}



The error occurs when I try to create a FirefoxDriver instance. Do I
need to have the Selenium server as I thought this is no longer
required.

I have tried the same in Eclipse and received the same error.

Thank you






gulsha...@gmail.com

unread,
Jul 23, 2011, 6:42:32 PM7/23/11
to Selenium Users
Have you added the "selenium-server-standalone.jar" file to class path?

Ilyas Patel

unread,
Jul 26, 2011, 1:04:50 PM7/26/11
to Selenium Users
I'm quite sure I have. In IntelliJ I have added it through Project
Structure -> Modules -> Dependencies tab.

The only thing I notice is the jar file is not appearing under the
External Libraries tree structure. There are a lot of dependencies
already here through Maven.

Thanks for responding

Gulshan Saini

unread,
Jul 26, 2011, 2:59:21 PM7/26/11
to seleniu...@googlegroups.com
Have you gone through this tutorial? http://seleniumhq.org/docs/appendix_installing_java_driver_client.html

I havent used IntelliJ. If you have started learning Selenium, I would suggest you to use ECLIPSE IDE instead of Intellij.

aseem marwaha

unread,
Feb 2, 2017, 9:56:13 PM2/2/17
to Selenium Users

The link posted by you doesnt exist anymore. nevertheless, i am a beginner with Selenium and having this difficulty. was the issue from llyas resolved?

⇜Krishnan Mahadevan⇝

unread,
Feb 2, 2017, 9:59:22 PM2/2/17
to Selenium Users
Aseem
You should start reading from here : http://www.seleniumhq.org/docs/03_webdriver.jsp

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/11125a49-f8c5-493d-919a-cf807e3618a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

aseem marwaha

unread,
Feb 3, 2017, 12:25:04 AM2/3/17
to seleniu...@googlegroups.com
Krishnan, 
That link was the first step I did. Finished the whole setup but I get the error message everytime I try to run the project. 

On Feb 3, 2017 3:59 AM, "⇜Krishnan Mahadevan⇝" <krishnan.ma...@gmail.com> wrote:
Aseem
You should start reading from here : http://www.seleniumhq.org/docs/03_webdriver.jsp

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Fri, Feb 3, 2017 at 3:12 AM, aseem marwaha <funky...@gmail.com> wrote:

The link posted by you doesnt exist anymore. nevertheless, i am a beginner with Selenium and having this difficulty. was the issue from llyas resolved?

On Tuesday, 26 July 2011 20:59:21 UTC+2, Gulshan Saini wrote:
Have you gone through this tutorial? http://seleniumhq.org/docs/appendix_installing_java_driver_client.html

I havent used IntelliJ. If you have started learning Selenium, I would suggest you to use ECLIPSE IDE instead of Intellij.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/2sJVJc2mN-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.

To post to this group, send email to selenium-users@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Feb 3, 2017, 12:30:33 AM2/3/17
to Selenium Users
Finished the whole setup but I get the error message everytime I try to run the project. 

What exactly is the error message you are getting ? You would need to share some details so that others can figure out what is going wrong with your setup

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Fri, Feb 3, 2017 at 10:54 AM, aseem marwaha <funky...@gmail.com> wrote:
Krishnan, 
That link was the first step I did. Finished the whole setup but I get the error message everytime I try to run the project. 
On Feb 3, 2017 3:59 AM, "⇜Krishnan Mahadevan⇝" <krishnan.mahadevan1978@gmail.com> wrote:
Aseem
You should start reading from here : http://www.seleniumhq.org/docs/03_webdriver.jsp

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Fri, Feb 3, 2017 at 3:12 AM, aseem marwaha <funky...@gmail.com> wrote:

The link posted by you doesnt exist anymore. nevertheless, i am a beginner with Selenium and having this difficulty. was the issue from llyas resolved?

On Tuesday, 26 July 2011 20:59:21 UTC+2, Gulshan Saini wrote:
Have you gone through this tutorial? http://seleniumhq.org/docs/appendix_installing_java_driver_client.html

I havent used IntelliJ. If you have started learning Selenium, I would suggest you to use ECLIPSE IDE instead of Intellij.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/11125a49-f8c5-493d-919a-cf807e3618a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/2sJVJc2mN-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

aseem marwaha

unread,
Feb 5, 2017, 1:31:57 PM2/5/17
to Selenium Users
Hello Krishnan, 

On clicking run in Intellij for a Selenium project using java language i get this error message : 

Error:(14, 18) java: cannot access org.openqa.selenium.remote.RemoteWebDriver
  class file for org.openqa.selenium.remote.RemoteWebDriver not found

I have followed the steps as mentioned in the selenium documentation but to no success.

Regards,
Aseem Marwaha

On Friday, 3 February 2017 06:30:33 UTC+1, Krishnan wrote:
Finished the whole setup but I get the error message everytime I try to run the project. 

What exactly is the error message you are getting ? You would need to share some details so that others can figure out what is going wrong with your setup

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Fri, Feb 3, 2017 at 10:54 AM, aseem marwaha <funky...@gmail.com> wrote:
Krishnan, 
That link was the first step I did. Finished the whole setup but I get the error message everytime I try to run the project. 
On Feb 3, 2017 3:59 AM, "⇜Krishnan Mahadevan⇝" <krishnan.ma...@gmail.com> wrote:
Aseem
You should start reading from here : http://www.seleniumhq.org/docs/03_webdriver.jsp

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Fri, Feb 3, 2017 at 3:12 AM, aseem marwaha <funky...@gmail.com> wrote:

The link posted by you doesnt exist anymore. nevertheless, i am a beginner with Selenium and having this difficulty. was the issue from llyas resolved?

On Tuesday, 26 July 2011 20:59:21 UTC+2, Gulshan Saini wrote:
Have you gone through this tutorial? http://seleniumhq.org/docs/appendix_installing_java_driver_client.html

I havent used IntelliJ. If you have started learning Selenium, I would suggest you to use ECLIPSE IDE instead of Intellij.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/2sJVJc2mN-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Feb 9, 2017, 10:26:46 PM2/9/17
to Selenium Users
Am assuming you were using Maven. Can you please share your pom file's <dependencies> section ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e43a9316-0cf7-451c-87e8-5f4f88595735%40googlegroups.com.

aseem marwaha

unread,
Mar 3, 2017, 4:00:32 PM3/3/17
to seleniu...@googlegroups.com
Hello Krishnan, 

Please find below the extract of dependencies section of my pom.xml:

<dependencies>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>3.0.1</version>
            </dependency>
   <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.0.1</version>
        </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-htmlunit-driver</artifactId>
        <version>2.52.0</version>
        </dependency>
<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-remote-driver</artifactId>
        <version>3.0.1</version>
        </dependency>
<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-ie-driver</artifactId>
        <version>3.0.1</version>
        </dependency>
        </dependencies>


Will that help to analyze the issue? Please let me know in case you need more input.

Best Regards,
Aseem Marwaha

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/2sJVJc2mN-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.

To post to this group, send email to selenium-users@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Mar 3, 2017, 10:51:17 PM3/3/17
to Selenium Users
Aseem,
Your dependencies look fine. If you run 

mvn clean test

from the command line and if you don't see any compilation errors then it would mean that your CLASSPATH is setup fine, but IntelliJ may have gotten corrupted. You may have to remove off IntelliJ specific files and try again.

You can also try invalidating caches in IntelliJ as explained in this SO thread and see if that helps


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Sat, Mar 4, 2017 at 2:30 AM, aseem marwaha <funky...@gmail.com> wrote:
Hello Krishnan, 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

aseem marwaha

unread,
Mar 4, 2017, 6:15:59 PM3/4/17
to seleniu...@googlegroups.com
Hello Krishnan, 

Thanks for replying. I did what you mentioned but unfortunately that didn't help. Nevertheless, I tried one workaround by manually adding the following jars to External libraries :
1. selenium-remote-driver-3.0.1.jar, and
2. selenium-server-standalone-3.0.1.jar 

With that this issue was resolved but now have two other issues as follows; maybe you can help there:
1. on clicking run i can run a test only once and the next time i get the following error :
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
2. this issue is resolved when i try to run the code in debug mode but then again it works only once.

Please note that i have kept the IE settings same across all security zones.

Thanks,
Aseem Marwaha

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/2sJVJc2mN-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Mar 4, 2017, 10:35:19 PM3/4/17
to Selenium Users
Hard to debug.

I would recommend that you place a break-point in "org.openqa.selenium.remote.ProtocolHandshake#createSession(org.openqa.selenium.remote.http.HttpClient, java.lang.StringBuilder)" on this line 

String resultString = response.getContentString();
and check what you see for the string "resultString". That should tell you exactly why its failing.





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Sun, Mar 5, 2017 at 4:45 AM, aseem marwaha <funky...@gmail.com> wrote:
Hello Krishnan, 

Thanks for replying. I did what you mentioned but unfortunately that didn't help. Nevertheless, I tried one workaround by manually adding the following jars to External libraries :
1. selenium-remote-driver-3.0.1.jar, and
2. selenium-server-standalone-3.0.1.jar 

With that this issue was resolved but now have two other issues as follows; maybe you can help there:
1. on clicking run i can run a test only once and the next time i get the following error :
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
2. this issue is resolved when i try to run the code in debug mode but then again it works only once.

Please note that i have kept the IE settings same across all security zones.

Thanks,
Aseem Marwaha

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

aseem marwaha

unread,
Mar 5, 2017, 3:17:38 PM3/5/17
to seleniu...@googlegroups.com
Hello Krishnan, 

This was perfect. The issue was the default zoom level in IE11 on windows 11 was set to 125%. even after doing registry settings it didnt work and had to force the "change the size of text, apps, and other items : 100%" in Display properties.

Thanks again for your time and support.

Best Regards,
Aseem Marwaha

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/2sJVJc2mN-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Mar 6, 2017, 1:21:58 AM3/6/17
to Selenium Users
Aseem,

I have raised a pull request, which attempts at ensuring that the errors bubble up to the end-users.


Lets hope it gets merged :)


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Mon, Mar 6, 2017 at 1:47 AM, aseem marwaha <funky...@gmail.com> wrote:
Hello Krishnan, 

This was perfect. The issue was the default zoom level in IE11 on windows 11 was set to 125%. even after doing registry settings it didnt work and had to force the "change the size of text, apps, and other items : 100%" in Display properties.

Thanks again for your time and support.

Best Regards,
Aseem Marwaha

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages