手机操作API
1. 获取手机分辨率
driver.get_windows_size()
print(driver.get_windows_size())
print(driver.get_windows_size()['width'])
2. 手机截图
应用场景
- 有问题但不报错
driver.get_screenshot_as_file()
默认图片放在当前项目目录下
driver.get_screenshot_as_file(“D:/first/1.png”)
3. 获取和设置手机网络
- 网络对照
"""Sets the network connection type. Android only.
Possible values:
+--------------------+------+------+---------------+
| Value (Alias) | Data | Wifi | Airplane Mode