Jitendra kumar
Jitendra kumar

Reputation: 106

Chrome Driver not working on android real devices using Appium

I have installed the chrome driver - version 37.0 and source -com.android.chrome-1.apk
Started the adb command and device is connecting properly. Enable the debug mode and checked usb device option

Capabilties -


below is code snippet which i have used to call the chrome browser
     capabilities.setCapability("appium-version", "1.0");
            capabilities.setCapability("platformName", "Android");
            capabilities.setCapability("platformVersion", "4.3");
            capabilities.setCapability("deviceName", "abc");
            capabilities.setCapability("browserNamex", "Chrome");
        driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"),capabilities);

Getting below error -

error: Chromedriver create session did not work. Status was 200 and body was {"sessionId":"e70c1dff331b9b35ce5e4b974ae3d47e","status":13,"value":{"message":"unknown error: com.android.browser is not installed on device 43001beab8cb1161\n (Driver info: chromedriver=2.10.267517,platform=Mac OS X 10.9.2 x86_64)"}}

debug: Cleaning up appium session error: Failed to start an Appium session, err was: Error: Did not get session redirect from Chromedriver

info: <-- POST /wd/hub/session 500

Upvotes: 0

Views: 6675

Answers (5)

Mallik
Mallik

Reputation: 11

Replace chromedriver 2.18.343845 to 2.20.353145, you problem will sove in C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win path

Upvotes: 0

Tarun
Tarun

Reputation: 3496

I had the same issue and found that I was running version of chrome browser which is less than 33 and this requires devices to be rooted. I update chrome browser to 40+ (I guess it was 48) and issue disappeared.

Device rooting requirement for version of chrome lower than 33 is available here -

http://appium.io/slate/en/master/?ruby#mobile-chrome-on-emulator-or-real-device

Upvotes: 2

kch
kch

Reputation: 57

Maybe it will help someone looking for solution to this error:

error: Chromedriver create session did not work. Status was 200 and body was {"sessionId":"e70c1dff331b9b35ce5e4b974ae3d47e","status":13,"value":{"message":"unknown error: com.android.browser is not installed on device 43001beab8cb1161\n (Driver info: chromedriver=2.10.267517,platform=Mac OS X 10.9.2 x86_64)"}} debug: Cleaning up appium session error: Failed to start an Appium session, err was: Error: Did not get session redirect from Chromedriver

After long struggle with that, what helped me was overwriting the original chromedriver (the one that gets automatically downloaded when you run ./reset.sh --android ) in [my appium installation location]/build/chromedriver/linux with a file manually downloaded from this site.

Make sure you delete old chromedriver and name the new one the same as the deleted one. I am using chromedriver 2.12

Upvotes: 1

greyProgrammer
greyProgrammer

Reputation: 136

i am using appium on windows for android. try using appium 1.1.0.0 just launch server through appium. set these capabilities in Eclipse

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,"Chrome");
    capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"4.3");
    capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"Android");                                    
    capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"GT-I9300");
    driver = new RemoteWebDriver(new URL(:1:4723/wd/hub"), capabilities);

its working for me .

thanks Rohit Vyas

Upvotes: 2

jcoopsco
jcoopsco

Reputation: 1

Based on this "unknown error: com.android.browser is not installed on device", it appears to be looking for the default browser instead of Chrome.

I notice there is a capability misspelled. It should be "browserName" instead of "browserNamex" like you have. That may be why it's not looking for the correct app package.

Upvotes: 0

Related Questions