logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

解决 uiautomator2 测试公众号、小程序无法定位元素

此时需要用到 uiautomator2 下的 d.reset_uiautomator()方法,,用于重置设备上的 uiautomator 服务。当您调用这个方法时,它会尝试关闭当前的 uiautomator 服务,并重新启动一个新的服务。这对于解决某些与 uiautomator 服务相关的问题非常有用。缺点是此方法执行需要一定的时间,大概半分钟左右,不过好在能解决定位元素的问题,聊胜于无吧。在测试

文章图片
Python 伪装请求头伪装useragent

安装pip install anti-useragent基本用法from anti_useragent import UserAgentua = UserAgent()ua.opera# Opera/9.80 (X11; Linux i686; U; ru) Presto/2.8.131 Version/11.11ua.chrome# Mozilla/5.0 (Windows NT 6.2; WO

#python#firefox#chrome
macOS把python3 设置成默认版本

1、在终端中 获取python3的安装路径:which python我的系统返回:/Library/Frameworks/Python.framework/Versions/3.8/bin/python32、在终端中 获取pip3的安装路径:which pip3我的系统返回:/Library/Frameworks/Python.framework/Versions/3.8/bi

#python
到底了