Appium starts Chrome instead of Stock Browser

I want to start Stock Browser on Android using following caps:

capabilities.setCapability(“appPackage”, “com.android.browser”);
capabilities.setCapability(“appActivity”, “com.android.browser.BrowserActivity”);

Why appium starts Chrome browser in chromedriver mode? As Chrome has another package and running chromedriver starts by other capability.
Adb command acts good in that case and launch stock browser: adb shell am start -n com.android.browser/.BrowserActivity.

Try using
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,“Browser”);

This should launch android browser. If you change “Browser” to “Chrome”, it will launch Chrome instead.

Have same problem, someone know what do with it?

Hi Simon,

Tried:
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,“Browser”);

The problem with that case some devices stuck after launching Native Browser, eg Samsung Galaxy Tab 3.10, Samsung Note 2, etc. with error: Did not get session redirect from chromedriver.

I would like to workaround that problem by launching app in native mode, but seems appium do trick there.

AFAIK stock browser will only work from API 19+ (4.4+).
I haven’t tried setting up an older android version as it is not the focus of my work atm, sorry.

Yep, it’s 4.4.2
@bootstraponline
Do you know how to launch Native browser without launching chromedriver mode as it stucks on Samsung?

I didnt tried in my real device, following link may help. The culprit is ChromeDriver version. I am not sure they still need chromedriver to launch Stock Browser.

How to launch Stock Browser

I think Appium is limited to automating Chrome with chromedriver on Android.

OK, but i don’t mind about Chromedriver in Native browser. And I want to cover Native browser too.
I want to use it like Native app.
How i can to workaround chromedriver start? Can i launch appium without specific app and then start app by driver.startActivity? Smth else?