How to handle a scenario where native browser (chrome/firefox) being launched from native App?

Hi all,

I am not sure this feature is present in current appium release for
android, but that case is very trivial case and many app come with such
traversal flows. i believe that feature is required for future appium
releases.

I tried with latest
(master–>bdb8221d18b6edadb2c39a450fc3b11a5c58008a) build with Java
client 2.1.0 to handle external browser.

Set windowHandles = driver.getWindowHandles(); throws error stating
“Method not yet implemented”. I tried the same with RemoteWebDriver but
the result is same.

Is there any way to handle this tricky situations?

Thanks,
Priyank Shah

Priyanka, I have a similar scenario. Can you share if you were able to find solution for this?

Did not receive any solution on this.

Thanks,
Priyank Shah

Hi Priyanka,

Yes I managed to solve my automation issue. Were you able to get it to working?

Her’s what I did, it was a bit tricky but the key is when you run the automation , even though you are in browser it considers it to be in Native_App context, hence xpath of chrome does not work.

What worked for me is taking the snapshot while executing the testcase on the browser page and using index instead of name/id etc.

Sample of xpath : //android.widget.EditText[@index=‘0’]

The index can vary by devices.

HTHs