滑动屏幕
模拟用户滑动屏幕的操作。
# python
driver.swipe(start_x=75, start_y=500, end_x=75, end_y=0, duration=800)
捏(Pinch)手势
在屏幕上使用捏(Pinch)手势。
# python
driver.pinch(element=el)
放大屏幕(Zoom)
在屏幕上使用放大手势。
# python
driver.zoom(element=el)
滚动到
滚动到指定的元素。
# python
driver.execute_script("mobile: scroll", {"direction": "down", "element": element.id})
拉取(pull)文件
从设备上拉取文件。
# python
driver.pull_file('Library/AddressBook/AddressBook.sqlitedb')
推送(push)文件
推送文件到设备。
# python
data = "some data for the file"
path = "/data/local/tmp/file.txt"
driver.push_file(path, data.encode('base64'))
领取专属 10元无门槛券
私享最新 技术干货