Opening chrome browser inside mobile devices

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

This is an old example for opening the internal browser:
Appium_browse_facebook.robot (503 Bytes)

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

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?

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 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

Thanks

1 Like