1、weditor的說明
WEditor可以理解為在瀏覽器中打開的uiautomatorviewer,個人使用起來比uiautomatorviewer更好用,不會像uiautomatorviewer那樣由於安卓系統的不同,會出現各種情況,還支持安卓、ios、Neco(beta);
如果在使用uiautomatorviewer遇到問題時,可以采用WEditor試試(個人更偏向使用weditor)。
2、weditor的安裝
GitHub地址:https://github.com/openatx/weditor
進入cmd,輸入pip install --pre --upgrade weditor
3、weditor的使用
3.1 鏈接手機,並打開手機的調試模式
3.2 打開cmd,輸入python -m uiautomator2 init,進行初始化,安裝uiautomator atx-agent部署守護進程
3.3打開cmd,輸入python -m weditor 會在瀏覽器打開一個頁面,如下圖所示,就可以進行元素定位了