Search code examples
javascriptandroidautomationadbuc-browser

Automation Test - Android adb connect to UC browser


I'm working on E2E automation testing on opening a local website in different mobile browsers. I'm using testcafe automation tool and it will generate a testing url with all automated cursor moves, clicks and screenshots. It works very well on desktop browsers and I would like to push the url to android devices.

I'm using following command to open android browsers, it works in many common browsers but not UC browser. In UC browser it only opens the app but not the specific url.

adb shell am start -n com.UCMobile/com.uc.browser.InnerUCMobile -a android.intent.action.VIEW -d http://google.com

How can I use adb tool to open UC browser with a specific url?


Solution

  • Try this

    adb shell am start  -a android.intent.action.VIEW -d "http://google.com" com.UCMobile.intl
    

    In my country the package name of the UC Browser is com.UCMobile.intl. Replace it with the package name of your browser.

    More Info