test automation using samsung internet browser using appium

2.1k views Asked by At

Used Below configuration to launch Samsung Internet browser....

DesiredCapabilities capabilities = DesiredCapabilities.android();           
capabilities.setCapability("appPackage","com.sec.android.app.sbrowser");    
capabilities.setCapability("appActivity","com.sec.android.app.sbrowser.SBrowserMainActivity");  
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "my phone");
capabilities.setCapability(MobileCapabilityType.VERSION, "8.1.0");
URL mobile_url = new URL("http://127.0.0.1:4723/wd/hub");
driver = new AndroidDriver(mobile_url, capabilities);
driver.get(url);
  1. Samsung default browser is lauching successfully, but shows Skip / Next button - these button navigates to browser page enter image description here
  2. elements not able interact (like click, sendkeys) enter image description here Please help me to solve these problems.
1

There are 1 answers

4
Amit Jain On

Launch the browser by adding below capability capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Browser");

Remove appPackage and appActivity

Inspect the screen using chrome remote debugger as shown in below screenshot enter image description here

Appium docs showing when browserName is 'Browser' it will launch default browser or native browser for Android

enter image description here