{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/macaca/issues/241","repository_url":"https://api.github.com/repos/alibaba/macaca","labels_url":"https://api.github.com/repos/alibaba/macaca/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/macaca/issues/241/comments","events_url":"https://api.github.com/repos/alibaba/macaca/issues/241/events","html_url":"https://github.com/alibaba/macaca/issues/241","id":181809485,"number":241,"title":"for循环内部使用driver方法该如何使用","user":{"login":"CodeToSurvive1","id":4576123,"avatar_url":"https://avatars.githubusercontent.com/u/4576123?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeToSurvive1","html_url":"https://github.com/CodeToSurvive1","followers_url":"https://api.github.com/users/CodeToSurvive1/followers","following_url":"https://api.github.com/users/CodeToSurvive1/following{/other_user}","gists_url":"https://api.github.com/users/CodeToSurvive1/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeToSurvive1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeToSurvive1/subscriptions","organizations_url":"https://api.github.com/users/CodeToSurvive1/orgs","repos_url":"https://api.github.com/users/CodeToSurvive1/repos","events_url":"https://api.github.com/users/CodeToSurvive1/events{/privacy}","received_events_url":"https://api.github.com/users/CodeToSurvive1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alibaba/macaca/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":{"login":"zenzhu","id":1044425,"avatar_url":"https://avatars.githubusercontent.com/u/1044425?v=3","gravatar_id":"","url":"https://api.github.com/users/zenzhu","html_url":"https://github.com/zenzhu","followers_url":"https://api.github.com/users/zenzhu/followers","following_url":"https://api.github.com/users/zenzhu/following{/other_user}","gists_url":"https://api.github.com/users/zenzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/zenzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenzhu/subscriptions","organizations_url":"https://api.github.com/users/zenzhu/orgs","repos_url":"https://api.github.com/users/zenzhu/repos","events_url":"https://api.github.com/users/zenzhu/events{/privacy}","received_events_url":"https://api.github.com/users/zenzhu/received_events","type":"User","site_admin":false},"assignees":[{"login":"zenzhu","id":1044425,"avatar_url":"https://avatars.githubusercontent.com/u/1044425?v=3","gravatar_id":"","url":"https://api.github.com/users/zenzhu","html_url":"https://github.com/zenzhu","followers_url":"https://api.github.com/users/zenzhu/followers","following_url":"https://api.github.com/users/zenzhu/following{/other_user}","gists_url":"https://api.github.com/users/zenzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/zenzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenzhu/subscriptions","organizations_url":"https://api.github.com/users/zenzhu/orgs","repos_url":"https://api.github.com/users/zenzhu/repos","events_url":"https://api.github.com/users/zenzhu/events{/privacy}","received_events_url":"https://api.github.com/users/zenzhu/received_events","type":"User","site_admin":false},{"login":"LynneXu","id":1435460,"avatar_url":"https://avatars.githubusercontent.com/u/1435460?v=3","gravatar_id":"","url":"https://api.github.com/users/LynneXu","html_url":"https://github.com/LynneXu","followers_url":"https://api.github.com/users/LynneXu/followers","following_url":"https://api.github.com/users/LynneXu/following{/other_user}","gists_url":"https://api.github.com/users/LynneXu/gists{/gist_id}","starred_url":"https://api.github.com/users/LynneXu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LynneXu/subscriptions","organizations_url":"https://api.github.com/users/LynneXu/orgs","repos_url":"https://api.github.com/users/LynneXu/repos","events_url":"https://api.github.com/users/LynneXu/events{/privacy}","received_events_url":"https://api.github.com/users/LynneXu/received_events","type":"User","site_admin":false},{"login":"brucejcw","id":8085088,"avatar_url":"https://avatars.githubusercontent.com/u/8085088?v=3","gravatar_id":"","url":"https://api.github.com/users/brucejcw","html_url":"https://github.com/brucejcw","followers_url":"https://api.github.com/users/brucejcw/followers","following_url":"https://api.github.com/users/brucejcw/following{/other_user}","gists_url":"https://api.github.com/users/brucejcw/gists{/gist_id}","starred_url":"https://api.github.com/users/brucejcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brucejcw/subscriptions","organizations_url":"https://api.github.com/users/brucejcw/orgs","repos_url":"https://api.github.com/users/brucejcw/repos","events_url":"https://api.github.com/users/brucejcw/events{/privacy}","received_events_url":"https://api.github.com/users/brucejcw/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-10-08T07:00:03Z","updated_at":"2016-10-09T10:05:20Z","closed_at":"2016-10-09T10:05:20Z","body":"<!--\r\nThanks for wanting to report an issue you've found in Macaca. Please fill in the template below by replacing the html comments with an appropriate answer.\r\n\r\nMacaca Version: usually output of `macaca -v`\r\nMacaca Doctor: usually output of `macaca doctor`\r\nPlatform: either `uname -a` output, or if Windows, version and 32 or 64-bit.\r\n\r\nThank you!\r\n-->\r\n\r\n* **Macaca Version**:\r\n\r\n* **Macaca Doctor Logs**:\r\n\r\n* **Operate System**:\r\n\r\n* **Programming Language**:\r\n\r\n<!-- Enter your issue details and log as much information as possible below this comment. -->\r\n关于密码键盘的实现思路目前采用图像识别的方式进行，即拿每个字母数字对应的图片去整个手机屏幕截图中匹配，找到最合适的位置后tap，下面伪代码为\r\n```java\r\n\r\n it('#5 match', function () {\r\n     for (var i = 0; i < codes.length; i++) {\r\n           var x_y = output.templateMatches('手机屏幕截图.png',code[i] +'.png');\r\n           driver.moveTo(null, x_y.x, x_y.y).click().sleep(1000);\r\n    }\r\n});\r\n\r\n```\r\n但是这种思路实现出来的效果好像不太对，貌似在driver前面没加return的时候出现问题，但是加了return就不符合逻辑了，请问这里该如何编写呢？\r\n"}}
{"actor":{"display_login":"xudafeng"}}