{"id":4717,"date":"2021-09-03T11:56:58","date_gmt":"2021-09-03T03:56:58","guid":{"rendered":"http:\/\/122.152.205.50\/wordpress\/?p=4717"},"modified":"2023-03-23T08:59:07","modified_gmt":"2023-03-23T00:59:07","slug":"%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95%e6%a1%86%e6%9e%b6%e6%90%ad%e5%bb%bauiautomator2weditor","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717","title":{"rendered":"\u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\u642d\u5efauiautomator2+weditor"},"content":{"rendered":"<p><a href=\"https:\/\/blog.csdn.net\/maetelibom\/article\/details\/51557941\">https:\/\/blog.csdn.net\/maetelibom\/article\/details\/51557941<\/a><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#1openatxuiautomator2\" title=\"1.openatx\/uiautomator2\">1.openatx\/uiautomator2<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE\" title=\"\u73af\u5883\u914d\u7f6e\">\u73af\u5883\u914d\u7f6e<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#-_python\" title=\"&#8211; python\">&#8211; python<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#-_pip\" title=\"&#8211; pip\">&#8211; pip<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#%E5%BC%80%E5%A7%8B%E9%9B%86%E6%88%90uiautomator2\" title=\"\u5f00\u59cb\u96c6\u6210uiautomator2\">\u5f00\u59cb\u96c6\u6210uiautomator2<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#uiautomator2%E4%BD%BF%E7%94%A8\" title=\"uiautomator2\u4f7f\u7528\">uiautomator2\u4f7f\u7528<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#%E5%8F%AF%E8%A7%86%E5%8C%96%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7weditor\" title=\"\u53ef\u89c6\u5316\u8c03\u8bd5\u5de5\u5177weditor\">\u53ef\u89c6\u5316\u8c03\u8bd5\u5de5\u5177weditor<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#0weditor%E5%AE%89%E8%A3%85\" title=\"0.weditor\u5b89\u88c5\">0.weditor\u5b89\u88c5<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#1weditor%E9%85%8D%E7%BD%AE\" title=\"1.weditor\u914d\u7f6e\">1.weditor\u914d\u7f6e<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#2weditor%E5%90%AF%E5%8A%A8%E6%8A%A5%E7%9A%84%E5%87%A0%E4%B8%AA%E9%94%99%E8%AF%AF\" title=\"2.weditor\u542f\u52a8\u62a5\u7684\u51e0\u4e2a\u9519\u8bef\">2.weditor\u542f\u52a8\u62a5\u7684\u51e0\u4e2a\u9519\u8bef<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=4717\/#3weditor%E5%85%B7%E4%BD%93%E4%BD%BF%E7%94%A8\" title=\"3.weditor\u5177\u4f53\u4f7f\u7528\">3.weditor\u5177\u4f53\u4f7f\u7528<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"1openatxuiautomator2\"><\/span>1.openatx\/uiautomator2<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u5173\u4e8euiautomator2\u7684\u96c6\u6210\uff0c\u5343\u4e07\u8981\u53bb\u5b98\u7f51\uff0c\u5426\u5219\u4f1a\u5404\u79cd\u95ee\u9898\u9891\u51fa\u3002\uff08\u53bb\u5b98\u7f51\u4e0b\u8f7d\u5de5\u5177\u3001\u8d44\u6599\u3001\u770b\u6587\u6863\u662f\u7a0b\u5e8f\u5458\u826f\u597d\u7684\u4e60\u60ef\u3002\uff09<br \/>\n<a href=\"https:\/\/github.com\/openatx\/uiautomator2\">https:\/\/github.com\/openatx\/uiautomator2<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE\"><\/span>\u73af\u5883\u914d\u7f6e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u5305\u62ecpython\u3001pip<\/p>\n<h4>- python<\/h4>\n<p>\u6ce8\u610fuiautomator2\u5b98\u65b9\u5b89\u88c5\u6559\u7a0b\u7b2c\u4e00\u6b65\uff0c\u6211\u96c6\u6210\u65f6uiautomator2\u4f1a\u81ea\u52a8\u53bb\u5b89\u88c5Pillow\u5de5\u5177\uff0c\u7248\u672c\u662fPillow 7.0.0\u3002<br \/>\n<img src=\"http:\/\/122.152.205.50\/wordpress\/wp-content\/uploads\/2021\/09\/Pillow7.0.0.png\" alt=\"\" \/><br \/>\n\u5982\u679cpython\u7248\u672c\u548cPillow\u652f\u6301\u7684\u7248\u672c\u5bf9\u5e94\u4e0d\u4e0a\uff0c\u547d\u4ee4\u884c\u53ef\u80fd\u4f1a\u62a5\u9519\uff0c\u5c06\u547d\u4ee4\u884c\u7c98\u8d34\u5230\u6587\u672c\u7f16\u8f91\u5668\u91cc\u4ed4\u7ec6\u5206\u6790\uff0c\u80fd\u53d1\u73b0\u8fd9\u4e2a\u9519\u8bef\uff1a<\/p>\n<pre><code class=\"language-bash\">C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-bd868qj9\\Pillow\\setup.py:42: RuntimeWarning:\n Pillow 7.0.0 does not support Python 3.9 and does not provide prebuilt Windows binaries.\nWe do not recommend building from source on Windows<\/code><\/pre>\n<p><strong>\u53bbPillow\u5b98\u7f51\u67e5\u770b\u5bf9\u5e94Python\u7248\u672c<\/strong><br \/>\n<img src=\"http:\/\/122.152.205.50\/wordpress\/wp-content\/uploads\/2021\/09\/Pillow-python.png\" alt=\"\" \/><br \/>\n\u6211\u9009\u62e9\u7684python\u7248\u672c\u662f3.6<br \/>\n<strong>\u53bbpython\u5b98\u7f51\u4e0b\u8f7dpython<\/strong><br \/>\n<a href=\"https:\/\/www.python.org\/downloads\/windows\/\">https:\/\/www.python.org\/downloads\/windows\/<\/a><br \/>\n\u6211\u9009\u62e9\u7684\u662f3.6\u7684\u7b2c\u4e00\u4e2a\u7248\u672c\uff1a<a href=\"https:\/\/www.python.org\/downloads\/release\/python-360a2\/\">Python 3.6.0a2 - June 13, 2016<\/a><\/p>\n<p>\u5b89\u88c5python\u8bb0\u5f97\u52fe\u9009add python.exe to path\u7684\u9009\u9879\uff0c\u5426\u5219\u547d\u4ee4\u884c\u4e0d\u8bc6\u522bpython\u3002<\/p>\n<h4>- pip<\/h4>\n<p>pip\u662fpython\u7684\u4e00\u4e2a\u4e0b\u8f7d\u5de5\u5177\uff0c\u65b9\u4fbf\u4ece\u7f51\u7edc\u4e0ainstall\u5404\u79cd\u5e93\u3002<br \/>\n<strong>\u5b98\u65b9\u5b89\u88c5<\/strong><br \/>\n<a href=\"https:\/\/pip.pypa.io\/en\/stable\/installing\/\">https:\/\/pip.pypa.io\/en\/stable\/installing\/<\/a><br \/>\n<strong>\u5378\u8f7dpip<\/strong><br \/>\n<a href=\"https:\/\/www.cnblogs.com\/burz\/p\/9099281.html\">https:\/\/www.cnblogs.com\/burz\/p\/9099281.html<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%BC%80%E5%A7%8B%E9%9B%86%E6%88%90uiautomator2\"><\/span>\u5f00\u59cb\u96c6\u6210uiautomator2<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u4e25\u683c\u53c2\u7167github\u4e0a\u7684Install\u6559\u7a0b\u6267\u884c\u5373\u53ef<\/p>\n<h4><span class=\"ez-toc-section\" id=\"uiautomator2%E4%BD%BF%E7%94%A8\"><\/span>uiautomator2\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\u83b7\u53d6\u5f53\u524dactivity(\u53cd\u7f16\u8bd1\u67e5\u627e\u5b9a\u4f4d)<br \/>\n<code><code>uiautomator2 current<\/code><\/code><\/li>\n<li>\u622a\u5c4f<br \/>\n<code><code> uiautomator2 screenshot screenshot.jpg<\/code><\/code><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"%E5%8F%AF%E8%A7%86%E5%8C%96%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7weditor\"><\/span>\u53ef\u89c6\u5316\u8c03\u8bd5\u5de5\u5177weditor<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/blog.csdn.net\/xgh1951\/article\/details\/97241656\">https:\/\/blog.csdn.net\/xgh1951\/article\/details\/97241656<\/a><br \/>\n\u7b80\u76f4\u662f\u53cd\u7f16\u8bd1\u7684\u5f97\u529b\u52a9\u624b<\/p>\n<h4><span class=\"ez-toc-section\" id=\"0weditor%E5%AE%89%E8%A3%85\"><\/span>0.weditor\u5b89\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><code>pip install weditor -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\/<\/code><\/p>\n<h4><span class=\"ez-toc-section\" id=\"1weditor%E9%85%8D%E7%BD%AE\"><\/span>1.weditor\u914d\u7f6e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\n<p>1.\u5f00\u542fweditor (\u6ce8\u610f\u5148\u628ausb\u7ebf\u6216\u8005wifi\u8fde\u63a5\u4e0a)<br \/>\ncmd\u547d\u4ee4\u884c\u8f93\u5165<br \/>\n<code><code>weditor\u6216\u8005python -m weditor<\/code><\/code><\/p>\n<\/li>\n<li>\n<p>2.\u6b63\u786e\u5173\u95edweditor<br \/>\n\u60f3\u5173\u95edweditor\uff0c\u8981\u5173\u95edweditor\u7a97\u53e3\u3002\u53ea\u5173\u7f51\u9875\uff0c\u518d\u6267\u884c\u6253\u5f00weditor\u7684\u547d\u4ee4\u5c31\u4f1a\u62a5\u9519\uff1a<br \/>\n<code><code>Another weditor(0.4.2) is already running<\/code><\/code><\/p>\n<\/li>\n<li>\n<p>3.\u4e0d\u5f97\u4e0d\u63d0\u5230\u7684\u5751<br \/>\n<img src=\"http:\/\/122.152.205.50\/wordpress\/wp-content\/uploads\/2021\/09\/weditor.png\" alt=\"\" \/><br \/>\n\u8fd9\u91cc\u7684\u9759\u6001\u548c\u5b9e\u65f6\u7684\u610f\u601d\u662fdump hierarchy\u8981\u4e0d\u8981\u5b9e\u65f6\uff0c\u624b\u673a\u5207\u6362\u4e86\u754c\u9762\uff0c\u5b9e\u65f6\u5c31\u4f1a\u81ea\u52a8\u5237\u65b0\u9875\u9762\u3002\u4f46\u662fcmd\u547d\u4ee4\u884c\u4f1a\u4e00\u76f4\u8f93\u51fa\uff1a<br \/>\n<img src=\"http:\/\/122.152.205.50\/wordpress\/wp-content\/uploads\/2021\/09\/cmd_log.png\" alt=\"\" \/><br \/>\n\u5982\u679c\u6709bug\u8c03\u8bd5\u7684\u8bdd\uff0c\u6700\u597d\u628a\u5b9e\u65f6\u5173\u95ed\u3002<\/p>\n<\/li>\n<li>\n<p>4.weditor\u7f51\u9875\u7684back \u3001home\u3001power\u7b49\u70b9\u51fb\u90fd\u6ca1\u6709\u6548\u679c\uff0c\u811a\u672c\u65e0\u6cd5\u6267\u884c<br \/>\n<code><code>subprocess.py&quot;, if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0: OSError: [WinError 6] \u53e5\u67c4\u65e0\u6548<\/code><\/code><br \/>\n\u5347\u7ea7weditor\u5230\u6700\u65b0\u7684\u547d\u4ee4\u884c\u63d0\u793a\uff1a<code><code>jsonrpc_server started failed<\/code><\/code><br \/>\n\u5c1d\u8bd5\u5378\u8f7dweditor\uff0c\u53d1\u73b0\u6211\u7684\u7248\u672c\u662fweditor-0.4.2\uff0c\u6ce8\u610fuiautomator2 Install\u6587\u6863\u91cc\u8bf4\u660e\u4e86weditor\u7684\u7a33\u5b9a\u7248\u672c\u662f0.1.0\uff0c\u4e8e\u662f\u91cd\u65b0\u4e0b\u8f7d\uff1a<\/p>\n<pre><code>pip install -U weditor==0.1.0<\/code><\/pre>\n<p>\u95ee\u9898\u89e3\u51b3\uff0c\u4f460.1.0\u7248\u672c\u76f8\u6bd4\u4e8e0.4.2\u5c11\u4e86\u8bbe\u5907connect\u7684\u6a21\u677f\u4ee3\u7801\u3002<\/p>\n<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"2weditor%E5%90%AF%E5%8A%A8%E6%8A%A5%E7%9A%84%E5%87%A0%E4%B8%AA%E9%94%99%E8%AF%AF\"><\/span>2.weditor\u542f\u52a8\u62a5\u7684\u51e0\u4e2a\u9519\u8bef<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\n<p>Local server not started, start with $ python -m weditor<br \/>\n<a href=\"https:\/\/blog.csdn.net\/Jonia430\/article\/details\/125905961\">https:\/\/blog.csdn.net\/Jonia430\/article\/details\/125905961<\/a><br \/>\n\u6ca1\u6709\u542f\u52a8uiautomator2,\u8981\u6267\u884c<code>python -m uiautomator2 init<\/code><\/p>\n<\/li>\n<li>\n<p>cannot identify image file &lt;_io.BytesIO object at 0x0000015F5F6E2FC0&gt;<br \/>\n<a href=\"https:\/\/blog.csdn.net\/weixin_42277380\/article\/details\/118492888\">https:\/\/blog.csdn.net\/weixin_42277380\/article\/details\/118492888<\/a><br \/>\n\u624b\u673a\u8bbe\u5907\u4e0a\u7684atx\u6ca1\u6709\u6b63\u5e38\u542f\u52a8<\/p>\n<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"3weditor%E5%85%B7%E4%BD%93%E4%BD%BF%E7%94%A8\"><\/span>3.weditor\u5177\u4f53\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<button class=\"simplefavorite-button\" data-postid=\"4717\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>https:\/\/blog.csdn.net\/maetelibom\/article\/details\/5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[232],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/4717"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4717"}],"version-history":[{"count":9,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/4717\/revisions"}],"predecessor-version":[{"id":9075,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/4717\/revisions\/9075"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4717"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}