模拟器:
SDK自带模拟器
浏览器:
模拟器原生浏览器
测试代码:
def setup(self):
desired_caps = {
"platformName": "Android",
"platformVersion": "6.0",
"deviceName": "emulator-5554",
"noReset":True,
"skipDeviceInitialization":True,
"browserName":"Browser",
"chromedriverExcutable":"E:/Android/chromedriver/chromedriver_2.20"
}
self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
self.driver.implicitly_wait(10)
def teardown(self):
self.driver.quit()
def test_browser(self):
self.driver.get("https://m.baidu.com")
sleep(5)
模拟器运行截图:
启动浏览器,模拟器自动打开默认主页。
由于google网页被墙,所以一直打不开,然后appium就无法进行get_url的请求,最后超时。
报错信息:
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded