自动化测试 - Android adb 连接到 UC 浏览器
Automation Test - Android adb connect to UC browser
我正在研究在不同的移动浏览器中打开本地网站的 E2E 自动化测试。我正在使用 testcafe 自动化工具,它将生成一个测试 url,其中包含所有自动光标移动、点击和屏幕截图。它在桌面浏览器上运行良好,我想将 url 推送到 android 设备。
我正在使用以下命令打开 android 浏览器,它适用于许多常见的浏览器,但不适用于 UC 浏览器。在 UC 浏览器中它只打开应用程序而不是特定的 url。
adb shell am start -n com.UCMobile/com.uc.browser.InnerUCMobile -a android.intent.action.VIEW -d http://google.com
如何使用adb工具打开带有特定url的UC浏览器?
试试这个
adb shell am start -a android.intent.action.VIEW -d "http://google.com" com.UCMobile.intl
在我的国家,UC 浏览器的包名是 com.UCMobile.intl。
替换成你浏览器的包名。
我正在研究在不同的移动浏览器中打开本地网站的 E2E 自动化测试。我正在使用 testcafe 自动化工具,它将生成一个测试 url,其中包含所有自动光标移动、点击和屏幕截图。它在桌面浏览器上运行良好,我想将 url 推送到 android 设备。
我正在使用以下命令打开 android 浏览器,它适用于许多常见的浏览器,但不适用于 UC 浏览器。在 UC 浏览器中它只打开应用程序而不是特定的 url。
adb shell am start -n com.UCMobile/com.uc.browser.InnerUCMobile -a android.intent.action.VIEW -d http://google.com
如何使用adb工具打开带有特定url的UC浏览器?
试试这个
adb shell am start -a android.intent.action.VIEW -d "http://google.com" com.UCMobile.intl
在我的国家,UC 浏览器的包名是 com.UCMobile.intl。 替换成你浏览器的包名。