SeleniumHQ / selenium-google-code-issue-archive

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

Android - RemoteWebDriver #6463

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 6463

Hi I am follwing below steps for remote webdriver - Android

Step 1: Create Avd 
Step2: adb -s emulator-5554 -e install -r  android-server-2.32.0.apk
Step3:adb -s emulator-5554 shell am start -a android.intent.action.MAIN -n org.openqa.selenium.android.app/.MainActivity
Step4: adb -s emulator-5554  forward tcp:4723 tcp:8080

WebDriver is ready in Emulator....

Step5: Launch Selenium Server
java -jar selenium-server-standalone-2.37.0.jar -port 4444 -role hub -nodeTimeout 600

Step6: Create Node.config file. 
{
  "capabilities":
      [
        {
          "browserName": "android",
          "version":"4.3",
          "maxInstances": 1,
      "platform": "WINDOWS",
        }
      ],
  "configuration":
  {
    'registerCycle': 5000, 
     'hub': 'http://localhost:4444/grid/register', 
      'host': 'localhost', 
      'proxy': 'org.openqa.grid.selenium.proxy.DefaultRemoteProxy', 
      'maxSession': 1, 
     'port': 4723, 
     'hubPort': 4444, 
    'hubHost': 'localhost', 
    'url': 'http://localhost:4723', 
    'remoteHost': 'http://localhost:4723', 
    'register': true, 
    'role': 'node'    
 }
}

Step 7: java -jar selenium-server-standalone-2.37.0.jar -role node -nodeConfig defaultNodeConfig.json

Step 8:http://localhost:4444/grid/console ----> Could able to see below items:
DefaultRemoteProxy (version : 2.37.0)
id : http://127.0.0.1:4723, OS : WINDOWS
BrowsersConfigurationWebDriver v:4.3 

Step 9: http://127.0.0.1:4724/wd/hub/static/resource/hub.html
I could see two button one start session and other refresh session
upon clicking start session.... displays with popup to select browser. I have selected
"Android" (or) run remote webdriver class file in eclipse

Step10:Node command window displays with below error

C:\SeleniumGrid>java -jar selenium-server-standalone-2.37.0.jar -role node -node
Config defaultNodeConfig.json
Oct 24, 2013 6:49:11 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid node
18:49:12.838 INFO - Java: Oracle Corporation 23.25-b01
18:49:12.858 INFO - OS: Windows 7 6.1 amd64
18:49:12.893 INFO - v2.37.0, with Core v2.37.0. Built from revision a7c61cb
18:49:13.005 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPad, version=}] does not match with current platform: VISTA
18:49:13.089 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPhone, version=}] does not match with current platform: VISTA
18:49:13.172 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4724/wd/hub
18:49:13.173 INFO - Version Jetty/5.1.x
18:49:13.174 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
18:49:13.175 INFO - Started HttpContext[/selenium-server,/selenium-server]
18:49:13.176 INFO - Started HttpContext[/,/]
18:49:13.179 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@34b0e4
82
18:49:13.179 INFO - Started HttpContext[/wd,/wd]
18:49:13.182 INFO - Started SocketListener on 0.0.0.0:4724
18:49:13.183 INFO - Started org.openqa.jetty.jetty.Server@2d65c88b
18:49:13.185 INFO - using the json request : {"class":"org.openqa.grid.common.Re
gistrationRequest","capabilities":[{"seleniumProtocol":"WebDriver","platform":"A
NDROID","browserName":"android","maxInstances":1,"version":"4.3"}],"configuratio
n":{"nodeConfig":"defaultNodeConfig.json","port":4724,"host":"localhost","hubHos
t":"localhost","registerCycle":5000,"hub":"http://localhost:4444/grid/register",
"url":"http://localhost:4724","remoteHost":"http://localhost:4724","register":tr
ue,"proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","maxSession":1,"r
ole":"node","hubPort":4444}}
18:49:13.187 INFO - Starting auto register thread. Will try to register every 50
00 ms.
18:49:13.188 INFO - Registering the node to hub :http://localhost:4444/grid/regi
ster
18:49:27.025 INFO - Executing: [static resource: /org/openqa/selenium/remote/ser
ver/resource/hub.html] at URL: /static/resource/hub.html)
18:49:27.027 INFO - Done: /static/resource/hub.html
18:49:27.070 INFO - Executing: [static resource: /org/openqa/selenium/remote/ser
ver/resource/client.js] at URL: /static/resource/client.js)
18:49:27.072 INFO - Done: /static/resource/client.js
18:49:27.070 INFO - Executing: [static resource: /org/openqa/selenium/remote/ser
ver/resource/style.css] at URL: /static/resource/style.css)
18:49:27.077 INFO - Done: /static/resource/style.css
18:49:27.164 INFO - Executing: org.openqa.selenium.remote.server.handler.GetAllS
essions@51021b85 at URL: /sessions)
18:49:27.196 INFO - Done: /sessions
18:51:35.414 INFO - Executing: [new session: {browserName=android}] at URL: /ses
sion)
18:51:35.453 INFO - Creating a new session for Capabilities [{browserName=androi
d}]

Please suggest it couldnt able to identify the driver.....

Reported by chandra.haran on 2013-10-24 10:53:28

lukeis commented 8 years ago
I would request anyone please address this issue.

Reported by chandra.haran on 2013-10-24 11:47:23

lukeis commented 8 years ago
work around is to use an older API level for your emulator (I believe 8 or 15 works)

Reported by luke.semerau on 2013-10-24 19:03:35

lukeis commented 8 years ago
HI, Is there known issue in API Level 18.... If so will it get fixed.
I would request you let us know.....

Thanks in advance....

Regards,
Hariharan.

Reported by chandra.haran on 2013-10-25 03:19:08

lukeis commented 8 years ago

Reported by chandra.haran on 2013-10-25 03:19:41


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:18:07