appium设备交互-打电话,发短信,修改网络状态,截图,录屏
一、appium设备交互详解http://appium.io/docs/en/about-appium/intro/举例def test_moblie(self):#打电话self.driver.make_gsm_call('18095786878', GsmCallActions.CALL)#发短信self.driver.send_sms('18095785878','hello appium'
·
一、appium设备交互详解
http://appium.io/docs/en/about-appium/intro/
举例
def test_moblie(self):
#打电话
self.driver.make_gsm_call('18095786878', GsmCallActions.CALL)
#发短信
self.driver.send_sms('18095785878','hello appium')
# 开始录屏(华为不支持,android8.0版本支持录屏)
self.driver.start_recording_screen()
#修改网络模式
self.driver.set_network_connection(1)
#当前界面截图保存
self.driver.get_screenshot_as_file('/Screenshots/foo.png')
time.sleep(5)
#修改回原来的网络状态
self.driver.set_network_connection(4)
#停止录屏
self.driver.stop_recording_screen()
更多推荐
所有评论(0)