2

I want to run my Webpage UI testing in firefox browser in android device, for this i need to get firefox driver, so that using that driver i can perform certain actions in the webpage. In my case, initially i am able to open the firefox browser by starting an intent using the following command,

/platform-tools/adb shell am start -a android.intent.action.MAIN -n org.mozilla.firefox/.App

after this, i used the following lines of code to get the webdriver, but i am unable to get the driver instance for this opened browser.

DesiredCapabilities capability = DesiredCapabilities.firefox();
capability.setBrowserName("firefox");
capability.setCapability("Browser", "firefox"); capability.setCapability(CapabilityType.BROWSER_NAME, "firefox");
wd = new RemoteWebDriver(u, capability);

Someone please help me out of this. Thanks in advance.

  • 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.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' System info: host: 'hdc2-d-7tfs4p1.gdnindia.com', ip: '10.211.166.253', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.6.0_65' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593) – user4911853 May 19 '15 at 04:20
  • [INFO] 2015-05-19 09:58:50,340 [ExecuteTest] getWebDriver - Webdriver: null – user4911853 May 19 '15 at 04:20
  • I am getting the above exception and webdriver is always null – user4911853 May 19 '15 at 04:21
  • I added "Selendroid.jar" in my build path, but the error still remains – user4911853 May 19 '15 at 04:24
  • Also, i am getting the below exception in addition with above said exception, – user4911853 May 19 '15 at 04:58
  • Caused by: org.apache.http.NoHttpResponseException: 192.168.2.23:8080 failed to respond at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:153) – user4911853 May 19 '15 at 05:05
  • at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at – user4911853 May 19 '15 at 05:06
  • org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144) at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:72) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:133) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572) ... 6 more – user4911853 May 19 '15 at 05:07
  • @Saifur: Please help me out here. I am waiting for long days. Someone help me. – user4911853 Jun 05 '15 at 09:15
  • Anybody, tell me an 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. – user4911853 Jun 16 '15 at 12:23

0 Answers0