我如何启动web浏览器并使用adb搜索除默认值以外的网站,例如每次运行代码时,浏览器都会在默认的chrome应用程序中打开,但如果我希望它在Firefox或其他web浏览器上搜索网站,该怎么办
import time
from ppadb.client import Client as AdbClient
client = AdbClient(host="127.0.0.1", port=5037)
devices = client.devices()
if len(devices) == 0:
print ('no device attached')
quit()
device = devices [0]
device.shell('am start -a android.intent.action.VIEW -d https://smartbear.com/')
我认为您可以根据要使用的浏览器使用不同的
am start
命令,例如(对于Chrome):或(Firefox):
或(网络视图):
等等
相关问题 更多 >
编程相关推荐