# Opening chrome browser inside mobile devices

**URL:** <https://forum.robotframework.org/t/opening-chrome-browser-inside-mobile-devices/2077>\
**Category:** Robot Framework\
**Created:** [6 July 2021 01:26 UTC](https://forum.robotframework.org/t/opening-chrome-browser-inside-mobile-devices/2077 "2021-07-06T01:26:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkz.t](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tkz.t](https://forum.robotframework.org/u/tkz.t)\
**Post date:** [6 July 2021 01:26 UTC](https://forum.robotframework.org/t/opening-chrome-browser-inside-mobile-devices/2077/1 "2021-07-06T01:26:52Z")

</div>

Hi there

Is there any way to open chrome browser inside mobile devices?  
I haven’t got any luck so far when trying to open browser inside mobile devices i.e chrome in android devices

Thanks in advance

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [6 July 2021 01:54 UTC](https://forum.robotframework.org/t/opening-chrome-browser-inside-mobile-devices/2077/2 "2021-07-06T01:54:09Z")

</div>

This is an old example for opening the internal browser:  
[Appium\_browse\_facebook.robot](https://forum.robotframework.org/uploads/short-url/2T6whObyWBtXWwYVlKb7uCVCsB.robot) (503 Bytes)

Other option is to use SeleniumLibrary.  
I don’t have an example here, for now.

---

<div class="post-metadata">

**Author:** ![tkz.t](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tkz.t](https://forum.robotframework.org/u/tkz.t)\
**Post date:** [17 July 2021 09:37 UTC](https://forum.robotframework.org/t/opening-chrome-browser-inside-mobile-devices/2077/3 "2021-07-17T09:37:16Z")

</div>

Hi @HelioGuilherme66 I try your code and getting this error during the execution

```
WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'adb.exe -P 5037 -s XXXXXXXX shell pm clear com.android.chrome' exited with code 255'; Stderr: 'Security exception: adb clearing user data is forbidden.

java.lang.SecurityException: adb clearing user data is forbidden.
		at com.android.server.am.ActivityManagerService.clearApplicationUserData(ActivityManagerService.java:7612)
		at com.android.server.pm.PackageManagerShellCommand.runClear(PackageManagerShellCommand.java:1616)
		at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:199)
		at android.os.ShellCommand.exec(ShellCommand.java:103)
		at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24713)
		at android.os.Binder.shellCommand(Binder.java:634)
		at android.os.Binder.onTransact(Binder.java:532)
		at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3075)
		at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4713)
		at android.os.Binder.execTransact(Binder.java:731)'; Code: '255'

```

Any idea on how to overcome above security issues?

---

<div class="post-metadata">

**Author:** ![hemanth.devaraj](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@hemanth.devaraj](https://forum.robotframework.org/u/hemanth.devaraj)\
**Post date:** [4 October 2024 06:27 UTC](https://forum.robotframework.org/t/opening-chrome-browser-inside-mobile-devices/2077/6 "2024-10-04T06:27:10Z")

</div>

Hi,  
I share the code which works for me, below code is to open a chrome browser in android mobile using appium library

\*\*\* Settings \*\*\*  
Documentation Mobile testing  
Library AppiumCluster

\*\*\* Test Cases \*\*\*  
Mobile testing  
[Documentation] Test case for mobile  
Open Application [http://127.0.0.1:4723](http://127.0.0.1:4723) platformName=Android deviceName=Pixel 7  
… appPackage=com.android.chrome appActivity=com.google.android.apps.chrome.Main  
… automationName=UIAutomator2 newCommandTimeout=6000 autoGrantPermissions=true chromedriverAutodownload=true  
… no\_reset=true  
Go To Url url=[https://www.robotframework.com](https://www.robotframework.com)

Thanks
