{"action":"created","comment":{"url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/comments/73489638","id":73489638,"diff_hunk":"@@ -40,6 +40,26 @@ commands.getText = async function (elementId) {\n   return await this.uiautomator2.jwproxy.command(`/element/${elementId}/text`, 'GET', {});\n };\n \n+commands.click = async function (elementId) {\n+  return await this.uiautomator2.jwproxy.command(`/element/${elementId}/click`, 'POST', {elementId});\n+};\n+\n+commands.tap = async function (elementId, x = 0, y = 0, count = 1) {\n+  for (let i = 0; i < count; i++) {\n+    if (elementId) {\n+      // we are either tapping on the default location of the element\n+      // or an offset from the top left corner\n+      if (x !== 0 || y !== 0) {\n+        await this.uiautomator2.jwproxy.command(`/element/${elementId}/click`, 'POST', {elementId, x, y});\n+      } else {\n+        await this.uiautomator2.jwproxy.command(`/element/${elementId}/click`, 'POST', {elementId});\n+      }\n+    } else {\n+      await this.uiautomator2.jwproxy.command(`/element/${elementId}/click`, 'POST', {x, y});","path":"lib/commands/element.js","position":null,"original_position":19,"commit_id":"97f3f3a557165b41772ef23d93ade45b05a3c15d","original_commit_id":"f066ceca4ac59cbc12c4fb9b74b8a1b50af5fe5b","user":{"login":"sravanmedarapu","id":4507565,"avatar_url":"https://avatars.githubusercontent.com/u/4507565?v=3","gravatar_id":"","url":"https://api.github.com/users/sravanmedarapu","html_url":"https://github.com/sravanmedarapu","followers_url":"https://api.github.com/users/sravanmedarapu/followers","following_url":"https://api.github.com/users/sravanmedarapu/following{/other_user}","gists_url":"https://api.github.com/users/sravanmedarapu/gists{/gist_id}","starred_url":"https://api.github.com/users/sravanmedarapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sravanmedarapu/subscriptions","organizations_url":"https://api.github.com/users/sravanmedarapu/orgs","repos_url":"https://api.github.com/users/sravanmedarapu/repos","events_url":"https://api.github.com/users/sravanmedarapu/events{/privacy}","received_events_url":"https://api.github.com/users/sravanmedarapu/received_events","type":"User","site_admin":false},"body":"what do you think about adding custom one, something like `/session/:sessionId/appium/tap` and will take `x,y` coordinates as POST body i.e. `{ \"x\" : double, \"y\": double }`","created_at":"2016-08-04T09:23:48Z","updated_at":"2016-08-04T09:23:48Z","html_url":"https://github.com/appium/appium-uiautomator2-driver/pull/30#discussion_r73489638","pull_request_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/comments/73489638"},"html":{"href":"https://github.com/appium/appium-uiautomator2-driver/pull/30#discussion_r73489638"},"pull_request":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30","id":79360832,"html_url":"https://github.com/appium/appium-uiautomator2-driver/pull/30","diff_url":"https://github.com/appium/appium-uiautomator2-driver/pull/30.diff","patch_url":"https://github.com/appium/appium-uiautomator2-driver/pull/30.patch","issue_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues/30","number":30,"state":"open","locked":false,"title":"Webview support, tap, click and drag","user":{"login":"sravanmedarapu","id":4507565,"avatar_url":"https://avatars.githubusercontent.com/u/4507565?v=3","gravatar_id":"","url":"https://api.github.com/users/sravanmedarapu","html_url":"https://github.com/sravanmedarapu","followers_url":"https://api.github.com/users/sravanmedarapu/followers","following_url":"https://api.github.com/users/sravanmedarapu/following{/other_user}","gists_url":"https://api.github.com/users/sravanmedarapu/gists{/gist_id}","starred_url":"https://api.github.com/users/sravanmedarapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sravanmedarapu/subscriptions","organizations_url":"https://api.github.com/users/sravanmedarapu/orgs","repos_url":"https://api.github.com/users/sravanmedarapu/repos","events_url":"https://api.github.com/users/sravanmedarapu/events{/privacy}","received_events_url":"https://api.github.com/users/sravanmedarapu/received_events","type":"User","site_admin":false},"body":"- Added drag, tap and click\r\n\r\n- Handled webview support, added exclusive `CHROME_NO_PROXY` list and also implemented `suspendChromedriverProxy` . \r\n\r\n- Added `killUiAutomatorOnDevice`  to kill the existing the running server instance if any on device.","created_at":"2016-07-29T13:38:47Z","updated_at":"2016-08-04T09:23:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f924bcdc002e75ea57369aece123706f12d2aac4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30/commits","review_comments_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30/comments","review_comment_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues/30/comments","statuses_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/statuses/97f3f3a557165b41772ef23d93ade45b05a3c15d","head":{"label":"sravanmedarapu:master","ref":"master","sha":"97f3f3a557165b41772ef23d93ade45b05a3c15d","user":{"login":"sravanmedarapu","id":4507565,"avatar_url":"https://avatars.githubusercontent.com/u/4507565?v=3","gravatar_id":"","url":"https://api.github.com/users/sravanmedarapu","html_url":"https://github.com/sravanmedarapu","followers_url":"https://api.github.com/users/sravanmedarapu/followers","following_url":"https://api.github.com/users/sravanmedarapu/following{/other_user}","gists_url":"https://api.github.com/users/sravanmedarapu/gists{/gist_id}","starred_url":"https://api.github.com/users/sravanmedarapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sravanmedarapu/subscriptions","organizations_url":"https://api.github.com/users/sravanmedarapu/orgs","repos_url":"https://api.github.com/users/sravanmedarapu/repos","events_url":"https://api.github.com/users/sravanmedarapu/events{/privacy}","received_events_url":"https://api.github.com/users/sravanmedarapu/received_events","type":"User","site_admin":false},"repo":{"id":60754619,"name":"appium-uiautomator2-driver","full_name":"sravanmedarapu/appium-uiautomator2-driver","owner":{"login":"sravanmedarapu","id":4507565,"avatar_url":"https://avatars.githubusercontent.com/u/4507565?v=3","gravatar_id":"","url":"https://api.github.com/users/sravanmedarapu","html_url":"https://github.com/sravanmedarapu","followers_url":"https://api.github.com/users/sravanmedarapu/followers","following_url":"https://api.github.com/users/sravanmedarapu/following{/other_user}","gists_url":"https://api.github.com/users/sravanmedarapu/gists{/gist_id}","starred_url":"https://api.github.com/users/sravanmedarapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sravanmedarapu/subscriptions","organizations_url":"https://api.github.com/users/sravanmedarapu/orgs","repos_url":"https://api.github.com/users/sravanmedarapu/repos","events_url":"https://api.github.com/users/sravanmedarapu/events{/privacy}","received_events_url":"https://api.github.com/users/sravanmedarapu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sravanmedarapu/appium-uiautomator2-driver","description":":warning::construction:","fork":true,"url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver","forks_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/forks","keys_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/teams","hooks_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/hooks","issue_events_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/issues/events{/number}","events_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/events","assignees_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/assignees{/user}","branches_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/branches{/branch}","tags_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/tags","blobs_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/languages","stargazers_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/stargazers","contributors_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/contributors","subscribers_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/subscribers","subscription_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/subscription","commits_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/contents/{+path}","compare_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/merges","archive_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/downloads","issues_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/issues{/number}","pulls_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/labels{/name}","releases_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/releases{/id}","deployments_url":"https://api.github.com/repos/sravanmedarapu/appium-uiautomator2-driver/deployments","created_at":"2016-06-09T06:39:36Z","updated_at":"2016-06-09T06:39:37Z","pushed_at":"2016-08-01T13:14:22Z","git_url":"git://github.com/sravanmedarapu/appium-uiautomator2-driver.git","ssh_url":"git@github.com:sravanmedarapu/appium-uiautomator2-driver.git","clone_url":"https://github.com/sravanmedarapu/appium-uiautomator2-driver.git","svn_url":"https://github.com/sravanmedarapu/appium-uiautomator2-driver","homepage":"","size":52,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"appium:master","ref":"master","sha":"60c36b375c934941d0a0991452a8482db99ba82d","user":{"login":"appium","id":3221291,"avatar_url":"https://avatars.githubusercontent.com/u/3221291?v=3","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":41711933,"name":"appium-uiautomator2-driver","full_name":"appium/appium-uiautomator2-driver","owner":{"login":"appium","id":3221291,"avatar_url":"https://avatars.githubusercontent.com/u/3221291?v=3","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appium/appium-uiautomator2-driver","description":":warning::construction:","fork":false,"url":"https://api.github.com/repos/appium/appium-uiautomator2-driver","forks_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/forks","keys_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/teams","hooks_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/hooks","issue_events_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues/events{/number}","events_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/events","assignees_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/assignees{/user}","branches_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/branches{/branch}","tags_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/tags","blobs_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/languages","stargazers_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/stargazers","contributors_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/contributors","subscribers_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/subscribers","subscription_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/subscription","commits_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/contents/{+path}","compare_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/merges","archive_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/downloads","issues_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues{/number}","pulls_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/labels{/name}","releases_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/releases{/id}","deployments_url":"https://api.github.com/repos/appium/appium-uiautomator2-driver/deployments","created_at":"2015-09-01T02:20:32Z","updated_at":"2016-04-19T13:40:09Z","pushed_at":"2016-08-01T13:14:23Z","git_url":"git://github.com/appium/appium-uiautomator2-driver.git","ssh_url":"git@github.com:appium/appium-uiautomator2-driver.git","clone_url":"https://github.com/appium/appium-uiautomator2-driver.git","svn_url":"https://github.com/appium/appium-uiautomator2-driver","homepage":"","size":17150,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30"},"html":{"href":"https://github.com/appium/appium-uiautomator2-driver/pull/30"},"issue":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues/30"},"comments":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/appium/appium-uiautomator2-driver/statuses/97f3f3a557165b41772ef23d93ade45b05a3c15d"}}}}
{"actor":{"display_login":"sravanmedarapu"}}