Could not start a new session. Possible causes are invalid address of the remote server.......

53,704 views
Skip to first unread message

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Jun 30, 2012, 11:14:52 AM6/30/12
to seleniu...@googlegroups.com
Guys,

I am getting this issue every time when i try to run back my selenium script in forefox:

The error i am getting is as follows:

Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.24.1', revision: '17205', time: '2012-06-19 16:53:24'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.7.0'
Driver info: driver.version: FirefoxDriver


Please help guys.....

Mike Riley

unread,
Jul 1, 2012, 1:13:28 AM7/1/12
to seleniu...@googlegroups.com
Please show the command lines you used to start the remote server (and grid server if you use Grid2), as well as your code that is trying to start the Selenium session with the server.

Mike

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Jul 2, 2012, 3:29:27 AM7/2/12
to seleniu...@googlegroups.com
Dear Mike,

I am not using command line to start the selenium standalone server, I am using the java code from eclipse ide as below to initiate Firefox driver:


WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");

Please correct me if i am missing something....

Thanks and Regards,
Nipun.

Mike Riley

unread,
Jul 2, 2012, 5:13:13 PM7/2/12
to seleniu...@googlegroups.com
Sorry, I didn't notice it said FirefoxDriver there.

I am guessing that it isn't able to find the driver in your current PATH settings.  Is it possibly not in the standard location?

You can give it the path if you pass it a Capabilities object with a pointer to the executable, but I prefer having it already set up for the system via PATH, so the code is system independent.  That way it works on any version of Windows, Mac, or Linux system.

You might take a look here:
http://seleniumhq.org/docs/04_webdriver_advanced.html#browser-startup-manipulation

Mike

Peter Gale

unread,
Jul 10, 2012, 8:22:34 AM7/10/12
to Selenium Users
Amira

An answer has been posted already ... see the link ar the bottom of Nipun's original email to the full discussion on googlegroups.com for details.

Peter


Date: Tue, 10 Jul 2012 05:17:59 -0700
From: mannai...@gmail.com
To: seleniu...@googlegroups.com
Subject: [selenium-users] Re: Could not start a new session. Possible causes are invalid address of the remote server.......

Dear Nipun,
i'm getting the same problem please could you post your solution
thank's a lot
Cheers
Amira
--
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/-/E8B1g0XjMWgJ.
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-US.

Amira Mannaii

unread,
Jul 10, 2012, 8:30:44 AM7/10/12
to seleniu...@googlegroups.com
yes Peter i tried it like this:
  driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), DesiredCapabilities.firefox());

but a new error appears :
Tests in error:
  testGoogleTest(GoogleIT): Safari could not be found in the path!(..)
  testGoogleTest(GoogleIT)

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0

2012/7/10 Peter Gale <peterjef...@hotmail.co.uk>

Amira Mannaii

unread,
Jul 10, 2012, 8:41:50 AM7/10/12
to seleniu...@googlegroups.com
This's me again i just deleted this sentence from the code driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Cheers

2012/7/10 Amira Mannaii <mannai...@gmail.com>

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Jul 18, 2012, 2:59:23 AM7/18/12
to seleniu...@googlegroups.com
Hi Amira,

Soory for the late reply. I have not solved the issue yet. I was having a client visit which kep me busy for the last one month.
So you are telling that you added the following line to your code to solve the issue:



WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);


am i correct? please let me know if it is working for you? did you set you firefox path in your system?
Thanks and regards,
Nipun


On Tuesday, July 10, 2012 6:11:50 PM UTC+5:30, Amira Mannaii wrote:
This's me again i just deleted this sentence from the code driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Cheers

2012/7/10 Amira Mannaii <mannai...@gmail.com>
yes Peter i tried it like this:
  driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), DesiredCapabilities.firefox());

but a new error appears :
Tests in error:
  testGoogleTest(GoogleIT): Safari could not be found in the path!(..)
  testGoogleTest(GoogleIT)

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0


2012/7/10 Peter Gale <peterjef...@hotmail.co.uk>
Amira

An answer has been posted already ... see the link ar the bottom of Nipun's original email to the full discussion on googlegroups.com for details.

Peter


Date: Tue, 10 Jul 2012 05:17:59 -0700
From: mannai...@gmail.com

Subject: [selenium-users] Re: Could not start a new session. Possible causes are invalid address of the remote server.......


Dear Nipun,
i'm getting the same problem please could you post your solution
thank's a lot
Cheers
Amira

Le samedi 30 juin 2012 17:14:52 UTC+2, Nipun ( http://seleniumtesting-nx.blogspot.in/ ) a écrit :
Guys,

I am getting this issue every time when i try to run back my selenium script in forefox:

The error i am getting is as follows:

Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.24.1', revision: '17205', time: '2012-06-19 16:53:24'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.7.0'
Driver info: driver.version: FirefoxDriver


Please help guys.....

--
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/-/E8B1g0XjMWgJ.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

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

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Jul 23, 2012, 1:23:13 AM7/23/12
to seleniu...@googlegroups.com
Hi Guys,

any idea why i am facing such an issue? your suggestions and thoughts will be highly appreciated.....

Mike Riley

unread,
Jul 23, 2012, 1:30:11 PM7/23/12
to seleniu...@googlegroups.com
Since you are not using a remote driver it can't be an invalid address.  That only leaves that your Firefox is not in the location it is expecting it to be in and it also is not in your PATH for the system.

Can you uninstall and then re-install Firefox, letting be put into the standard location?  Or set the path in a Capabilities instance is (I believe) the other option.  If you are using FF 14 you should also upgrade to 2.25.0, since that is where it is supported.

Mike

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Oct 3, 2012, 7:51:47 AM10/3/12
to seleniu...@googlegroups.com
Any update on this? are you able to resolve the issue?

On Friday, August 31, 2012 7:25:18 PM UTC+5:30, Светлана З wrote:
Hello,
I have the same problem and it looks next way: the test is failed with 'org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session....' and in a moment later (or in the same moment) FireFox Browser is opened with 'WebBrowser' in left bottom coner.
I tried all Mike's efforts: from reinstall FF,adding its path to system PATH,using Capabilities.Proxy parameter... and now it is the same result on 2.25.1 selenium version, FF.15.
 
Thanks in advance,
Svetlana
суббота, 30 июня 2012 г., 19:14:52 UTC+4 пользователь Nipun ( http://seleniumtesting-nx.blogspot.in/ ) написал:

Pankaj Dhapola

unread,
Oct 4, 2012, 12:28:37 PM10/4/12
to seleniu...@googlegroups.com
Hey Nipun,

Just inquisitive to know do you have Firefox executable file at "C:\Program Files\Mozilla Firefox\firefox.exe" ?

Can you try below code
FirefoxDriver ff = new FirefoxDriver(new FirefoxBinary(new java.io.File("absolute path to firefox.exe")), new FirefoxProfile());

Thx
Pankaj

Jon Thor Austen

unread,
Oct 4, 2012, 2:18:26 PM10/4/12
to seleniu...@googlegroups.com
Here is my code that reproduces this problem.   Can anyone get this code to work?

/*

Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:09:54'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_27'
Driver info: driver.version: ReusableFirefoxDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:493)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:182)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:185)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:178)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:174)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
    at tr.reporting.ReusableFirefoxDriver.<init>(ReusableFirefoxDriver.java:24)
    at tr.reporting.ReusableFirefoxDriver.main(ReusableFirefoxDriver.java:34)
Caused by: java.lang.NullPointerException
    at tr.reporting.ReusableFirefoxDriver$1.execute(ReusableFirefoxDriver.java:54)
    at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:357)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472)
    ... 8 more
*/

package tr.reporting;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.firefox.ExtensionConnection;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.internal.SocketLock;
import org.openqa.selenium.logging.LocalLogs;
import org.openqa.selenium.net.NetworkUtils;
import org.openqa.selenium.remote.Command;
import org.openqa.selenium.remote.HttpCommandExecutor;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.Response;

public class ReusableFirefoxDriver extends FirefoxDriver {
   
    private HttpCommandExecutor httpClient;
   
    public static void main(String...a) throws Exception {
        RemoteWebDriver driver = new ReusableFirefoxDriver();
        driver.get("http://www.google.com");
        System.out.println("Start second driver (Press enter)?");
        System.in.read();
        //The below code could be elsewhere in a different JVM
        driver = new ReusableFirefoxDriver();
        driver.get("http://www.bing.com");
    } 
   
    @Override
    protected void startSession( Capabilities desiredCapabilities ) {
        System.out.println("Starting session server");
        if( localServerURL!=null ) {
            httpClient = new HttpCommandExecutor( localServerURL );
        }
        super.startSession( desiredCapabilities );
    }

    @Override
    protected ExtensionConnection connectTo( FirefoxBinary binary, FirefoxProfile profile, String host ) {
        localServerURL = getURLofExistingLocalServer();
        if ( localServerURL!=null ) {
            return new ExtensionConnection() {
                @Override
                public Response execute( Command command ) throws IOException {
                    return httpClient.execute(command);
                }
               
                @Override
                public void start() throws IOException {
                    //NOOP
                }
               
                @Override
                public void quit() {
                    //NOOP
                }
               
                @Override
                public boolean isConnected() {                   
                    try {
                        httpClient.getAddressOfRemoteServer().openConnection().connect();
                        return true;
                    } catch (IOException e) {
                        return false;
                    }
                }

                @Override
                public void setLocalLogs( LocalLogs logs ) {
                    // TODO Auto-generated method stub                   
                }
            };
        }
        return super.connectTo(binary, profile, host);
    }
   
    private URL localServerURL = null;
   
    private URL getURLofExistingLocalServer() {
        Socket socket = new Socket();
        try {
            socket.bind(new InetSocketAddress("localhost", SocketLock.DEFAULT_PORT));
            return null; //Able to connect on default port (Assuming that default FF driver is not running)
        } catch (IOException e) {
        }finally{
            try {
                socket.close();
            } catch (IOException e) {
            }
        }
        try {
            return new URL("http",new NetworkUtils().obtainLoopbackIp4Address(), SocketLock.DEFAULT_PORT,"/hub");
        } catch (MalformedURLException e) {
            throw new WebDriverException(e);

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Dec 5, 2012, 6:02:17 AM12/5/12
to seleniu...@googlegroups.com
This issue is still not solved....guys please help....................


On Friday, November 9, 2012 7:38:57 AM UTC-6, Evelyn wrote:
Hello, I can not launch Safari. I installed the certificate all follow this blog: http://rationaleemotions.wordpress.com/2012/05/25/working-with-safari-driver/. but when running the test script the IDE returns me the following error Could not start the new session. Possible causes are invalid address of the remote server or browser start-up failure. Can anyone explain to me why we still encounter error?

Krishnan Mahadevan

unread,
Dec 5, 2012, 6:09:02 AM12/5/12
to seleniu...@googlegroups.com
What version of Selenium are you working with ?
That blog post of mine carries a disclaimer: The pre-built safari extension to which it has a link to, works only with Selenium 2.21.0

If you are working with a newer version of Selenium, I would suggest that you please revisit my blog. David has added some tips to the comments in that post.

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/


--
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.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/xzUPP0h1iW0J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Dec 5, 2012, 6:11:31 AM12/5/12
to seleniu...@googlegroups.com
1457 VIEWS for this post, but issue is still not solved....guys please help....................

Mike Riley

unread,
Feb 5, 2013, 12:57:42 AM2/5/13
to seleniu...@googlegroups.com
That sounds like you had an error in your PATH, because the JDK includes the JRE, but it is not the same directory as the JRE by itself installs it, as I recall.

Mike

On Monday, February 4, 2013 6:06:57 AM UTC-8, Dmitry Chernyshov wrote:

This problem was solved for me by changing the JRE System Library from jdk1.7.0 to jre7. After this my project works perfectly! I hope this solution will help somebody!

Gulshan Saini

unread,
Feb 5, 2013, 2:02:41 AM2/5/13
to seleniu...@googlegroups.com
Surprised - None of you notice NULL Pointer exception in stack trace

   at tr.reporting.ReusableFirefoxDriver.<init>(ReusableFirefoxDriver.java:24)
    at tr.reporting.ReusableFirefoxDriver.main(ReusableFirefoxDriver.java:34)
Caused by: java.lang.NullPointerException
    at tr.reporting.ReusableFirefoxDriver$1.execute(ReusableFirefoxDriver.java:54)
    at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:357)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472)
    ... 8 more



I think this should fix  - Not tested 

RemoteWebDriver driver;

public ReusableFirefoxDriver(){
    driver = new FireFoxDriver();
}


public static void main(String...a) throws Exception {
        driver = new ReusableFirefoxDriver();
        driver.get("http://www.google.com");
        System.out.println("Start second driver (Press enter)?");
        System.in.read();
        //The below code could be elsewhere in a different JVM
        driver = new ReusableFirefoxDriver();
        driver.get("http://www.bing.com");
    }  


Thanks
Gulshan

Arran

unread,
Mar 22, 2013, 5:32:00 AM3/22/13
to seleniu...@googlegroups.com
I'm also surprised you think we can solve your specific problem using our mind reading powers.

Please start a new topic, with your full code and a full stack trace of the error.

On Thursday, 21 March 2013 22:27:59 UTC, Krzysztof Chrzan wrote:
I have exacly the same problem. It is a pity we cant solve it.
firefox 12.0
Eclipse europa
Jre 1.7.0

Nipun ( http://seleniumtesting-nx.blogspot.in/ )

unread,
Oct 30, 2013, 10:28:56 PM10/30/13
to seleniu...@googlegroups.com
Hey Guys,

This issue is still opened. Please some one help all of us.

Arthur T

unread,
Oct 31, 2013, 8:22:57 PM10/31/13
to seleniu...@googlegroups.com
I too am getting this same error message appear after this line of code runs

driver = new InternetExplorerDriver();

The strange thing is, the browser is opening - it is just not initializing properly. 

I have scoured the forums and everyone is saying it is capability settings for ie - this is not the case for me. They are all the same. I have updated to the latest JDK, and I have tried several versions of selenium from 2.29 all the way up to 2.37

Nothing seems to work. 

The tests run fine on chrome and firefox, but we want to run our tests on all 3, since we have had issues in the past of some browsers not working, while others do - otherwise we would keep all our tests running with chrome driver.  

Is there any other setting for IE driver that I am missing??

Thanks

Anant Pal

unread,
Nov 1, 2013, 7:15:31 AM11/1/13
to seleniu...@googlegroups.com
This worked for me :


            System.setProperty("webdriver.ie.driver",<DRIVER PATH>);
            DesiredCapabilities capabilitiesIE = DesiredCapabilities.internetExplorer();
            capabilitiesIE.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
            Webdriver driver = new InternetExplorerDriver(capabilitiesIE);

gowthami chowdary

unread,
Nov 8, 2013, 2:32:24 AM11/8/13
to seleniu...@googlegroups.com
Add chrome.exe path or internetexplorer.exe path( which ever required browser u need ) to run to the class path in the system environmental variables by separating each with semicolon(;). create instance for that browser in the code and make it run.I hope this will works fine.

regard,
Gowthami

Veena

unread,
Feb 2, 2014, 11:59:09 PM2/2/14
to seleniu...@googlegroups.com
 Team , 
I am also facing the Same issue while using RemoteWebDriver , none of the browser instance are not working (Chorme, FF anf IE) 
Console Error :

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.35.0', revision: '8df0c6b', time: '2013-08-12 15:43:19'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_33'

Please help ! Quit Urgent 


Cheers
Veena 

ani0...@gmail.com

unread,
Feb 3, 2014, 3:03:11 AM2/3/14
to seleniu...@googlegroups.com
Pls post the code 

Sent from my BlackBerry10® on Airtel

From: Veena
Sent: Monday 3 February 2014 10:39 AM
Subject: [selenium-users] Re: Could not start a new session. Possible causes

are invalid address of the remote server.......

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

Bhanu Pratap

unread,
Feb 11, 2014, 2:12:44 AM2/11/14
to seleniu...@googlegroups.com
Build info: version: '2.35.0', revision: '8df0c6b', time: '2013-08-12 15:43:19'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_40'
Driver info: driver.version: ChromeDriver



if you are getting above problem, go to the chromedriver.exe location and try to execute the exe. if you are able to execute the exe then below code will work..othere wise it will be permission issue to the chromedriver folder. chnage the folder location or provide the permission to the folder and double click on chromedriver.exe.


Solution:-

System.setProperty("webdriver.chrome.driver", "C:/Driver/chromedriver.exe");
System.out.println(System.getProperty("webdriver.chrome.driver"));

WebDriver driver3 = new ChromeDriver(); 

Vikas Gahlaut

unread,
Mar 10, 2014, 5:15:32 AM3/10/14
to seleniu...@googlegroups.com
Upgrade your fire fox and Selenium jars, That will do

Ashutosh Dobal

unread,
Jul 21, 2014, 7:36:11 AM7/21/14
to seleniu...@googlegroups.com
HI Guys,
I am also getting the same issue while trying to open remote driver
package com.automation;
import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.WebDriver;

public class testRemote {

public static void main(String s[]) throws Exception {
URL url = new URL( "http", "localhost", 4444, "/wd/hub" );
DesiredCapabilities capabilities =DesiredCapabilities.firefox();
System.out.println("1");
capabilities.setJavascriptEnabled(true);
System.out.println("2");
WebDriver driver = new RemoteWebDriver(url,capabilities);
System.out.println("4");
driver.get("http://www.google.com");
}
}

version of jars n Firefox is compatible that is working in case of normal FirefoxDriver driver= new FirefoxDriver(); it is working. but in case of remote driver it is not working please help me ASAP.

Vikas Gahlaut

unread,
Jul 21, 2014, 8:01:03 AM7/21/14
to seleniu...@googlegroups.com
try updating the chrome driver(for issue with chrome) and selenium jars for both


--
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/q-463eIFAHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

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



--
Thanks,

Regards-
Vikas

Chinna

unread,
Oct 15, 2014, 1:06:46 PM10/15/14
to seleniu...@googlegroups.com
make sure you have started selenium server and registered the browser to grid

ilay

unread,
Jun 11, 2015, 12:05:29 AM6/11/15
to seleniu...@googlegroups.com
Hi,

I am working with Selendroid to test firefox in android device(Samsung S3).
i executed the following command in terminal,

java -jar documents/adse_pixel/supporting_jars/selendroid-standalone-0.15.0-with-dependencies.jar -app /Applications/Softwares/android-sdk-macosx/platform-tools/org.mozilla.firefox-2.apk


Selendroid Server has started successfully in port 4444, following message is shown in terminal

INFO: Selendroid standalone server has been started on port: 4444 

but, after that when i execute the following lines in eclipse,

SelendroidCapabilities capa = SelendroidCapabilities.device("org.mozilla.firefox:34.0");

wd = new SelendroidDriver(capa);


i got the following messages running in terminal,

Jun 10, 2015 1:18:51 PM io.selendroid.standalone.android.impl.AbstractDevice isSelendroidRunning
INFO: Checking if the Selendroid server is running: http://localhost:8083/wd/hub/status
Jun 10, 2015 1:18:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:8083: The target server failed to respond
Jun 10, 2015 1:18:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://localhost:8083
Jun 10, 2015 1:18:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:8083: The target server failed to respond
Jun 10, 2015 1:18:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://localhost:8083
Jun 10, 2015 1:18:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:8083: The target server failed to respond
Jun 10, 2015 1:18:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://localhost:8083
Jun 10, 2015 1:18:51 PM io.selendroid.standalone.android.impl.AbstractDevice isSelendroidRunning
INFO: Can't connect to Selendroid server, assuming it is not running.


Seems like, my android device(Samsung S3, Model:GT-I9300, Android Version: 4.1.2) is not responding.
So, what will be the problem. What should i do.
Can you please help me here.

Thanks & Regards,
Ilay.
Message has been deleted

ilay

unread,
Jun 16, 2015, 8:14:02 AM6/16/15
to seleniu...@googlegroups.com

Anybody, tell me any way to open firefox and opera browsers in an android device and i have to get driver object for that browser, with the driver object I need to perform several actions on the webpage like, open the URL, getting element locations/positions, clicking the object, verifying the object attributes, etc., I am unsuccessful in using with "RemoteWebDriver" and "Selendroid Driver", so please give me some idea/approach to do it.

Xuechun Wang

unread,
Mar 22, 2016, 3:57:52 AM3/22/16
to Selenium Users
Thank you Gowthami!! Such a simple step that I missed...After adding to the environment variable it is now working!

Btw I was using IE

Wolfgang

unread,
Jun 14, 2016, 12:48:19 AM6/14/16
to Selenium Users
Hi,

Windows 7, Firefox 47.0

running Selenium RC:
java -jar selenium-server-standalone-2.53.0.jar
  private Selenium selenium;
  selenium = new DefaultSelenium("localhost", 4444, "*chrome", "...");
...
run as "1 JUnit Test"

works fine. The server answers requests firefox opens and all handling is performed.

But
import org.openqa.selenium.firefox.FirefoxDriver;
private WebDriver driver;
driver = new FirefoxDriver();

does not. The server does not reply. I tried "java -jar selenium-server-standalone-2.53.0.jar  -role hub -port 4444", set the directories of firefox and selenium-server-standalone-2.53.0.jar into the path, all the way the same:


org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'LT-01-012', ip: '192.168.0.29', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_92'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
    at apptest.Buchung_wd02.setUp(Buchung_wd02.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:160)
    at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:380)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
    ... 31 more

Where is the difference in handling the Remote RC and WebDriver? What should I try?

Deontae Posley

unread,
Sep 8, 2016, 2:39:00 AM9/8/16
to Selenium Users
This worked for me
Reply all
Reply to author
Forward
0 new messages