python[3.8]
python3.5及以下的版本后面执行连接手机connect的时候会报错,请安装3.6及以上版本。我装的版本是3.8的
pip install atx
下面两种选择一种即可 镜像安装 pip install opencv-contrib-python -i https://pypi.mirrors.ustc.edu.cn/simple/ pip install opencv_python-3.2.0.7-cp35-cp35m-win32.whl
pip3 install xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
其他源地址:
1)http://mirrors.aliyun.com/pypi/simple/ 阿里云
2)https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
3) http://pypi.douban.com/simple/ 豆瓣
4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
5) http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
下面两种选择一种即可 pip install uiautomator pip install --pre -U uiautomator2 # 安装最新版
pip install weditor python -m uiautomator2 init 初始化插件 python -m weditor 打开浏览器抓取元素
设备管理界面:
https://www.appetizer.io初学者可以通过
print(dir(cls.con))打印出connect对象的所有属性和方法,遍于学习
以及ATX的api文档进行学习:https://github.com/NetEaseGame/ATX/blob/master/docs/API.md
例:安卓的对应的con的方法
['_AndroidDevice__display', '_DeviceMixin__keep_screen', '_DeviceMixin__last_screen', '_DeviceMixin__screensize', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_adb_client', '_adb_device', '_adb_shell_timeout', '_bounds', '_cal_scale', '_depth', '_host', '_listeners', '_match_auto', '_mktemp', '_open_image_file', '_parse_xml_node', '_port', '_randid', '_resolution', '_take_screenshot', '_trigger_event', '_uiauto', 'adb_cmd', 'adb_device', 'adb_server_host', 'adb_server_port', 'adb_shell', 'add_listener', 'bounds', 'clear_text', 'click', 'click_exists', 'click_image', 'click_nowait', 'current_app', 'current_ime', 'current_package_name', 'delay', 'display', 'do_tap', 'drag', 'dump', 'dump_nodes', 'dump_view', 'exists', 'forward', 'free_screen', 'image_match_method', 'image_match_threshold', 'info', 'input_methods', 'is_app_alive', 'keep_screen', 'keyevent', 'last_screenshot', 'long_click', 'match', 'match_all', 'pattern_open', 'platform', 'press', 'properties', 'raw_cmd', 'region', 'region_screenshot', 'resolution', 'rotation', 'screen_rotation', 'screenshot', 'serial', 'sleep', 'source', 'start_app', 'stop_app', 'swipe', 'touch', 'touch_image', 'type', 'uiautomator', 'wait', 'wait_gone', 'wlan_ip']
