SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

UnsupportedCommandException: While running the android junit on emulator #5963

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 5963

Hi 

I am successfully able to setup the android emulator and install the android apk file
as well. 
Now i am running the sample program given on link https://code.google.com/p/selenium/wiki/AndroidDriver
using web driver but currently i am getting an issue. PLease help me in resolving this
issue.

STACK TRACE: 
org.openqa.selenium.UnsupportedCommandException: 
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version:
'1.7.0_25'
Driver info: driver.version: AndroidDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:131)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:409)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:103)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:86)

Reported by sidd.bakshi on 2013-07-19 13:10:45


lukeis commented 8 years ago
As far as I know it used to work earlier. Try previous versions on selenium-server and
selenium-java. 

Now it doesn't work for me. I tried both android-server-2.21.0.apk and android-server-2.32.0.apk

Reported by dstarchevskyqa on 2013-07-19 13:35:13

lukeis commented 8 years ago

Reported by a.u.savchuk on 2013-07-20 07:58:05

lukeis commented 8 years ago
I have tried with both the apk's and still i am facing this issue.
I am using android 4.2.2 version while setting up the android version. 
Also running( http://localhost:8080/wd/hub) on the web browser does not show anything.

What could be the issue i am clueless?

Reported by sidd.bakshi on 2013-07-29 09:11:16

lukeis commented 8 years ago
did you run: adb -s <serialId> forward tcp:8080 tcp:8080   ?

Reported by dstarchevskyqa on 2013-07-29 11:01:18

lukeis commented 8 years ago
Yes i did but even after running the command my Sample google programme is not running
and gives the same error.
When i type in the command adb devices i get
List of devices attached
emulator-5554   device
It does not show message daemon not running. Starting process on port 5037 etc?
Can this be the issue?

Reported by sidd.bakshi on 2013-07-29 12:07:51

lukeis commented 8 years ago

Reported by barancev on 2013-07-30 19:56:09

lukeis commented 8 years ago
@dstarche...@gmail.com
did you run: adb -s <serialId> forward tcp:8080 tcp:8080   

hi, the port must be 8080? i setup android emulator on remote node. but it doesn't
work. i don't know here which port should be set.
my hub's port is 4444, and node's port is 5555. do i need to set it like this?
adb -s <serialId> forward tcp:4444 tcp:5555 

thank you!

Reported by 282822330@qq.com on 2013-09-29 10:07:22

lukeis commented 8 years ago
Selenium project no longer supports the AndroidDriver.

Please use Selendroid instead:
http://selendroid.io/webview.html

And log any issues against that project:
https://github.com/selendroid/selendroid/issues

Reported by luke.semerau on 2013-12-26 21:57:36

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:17:34