{"action":"created","comment":{"url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/comments/70337825","id":70337825,"diff_hunk":"@@ -506,32 +506,17 @@ public function setValue($xpath, $value)\n     type = node.type.toLowerCase();\n if (tagName == 'select') {\n   if (node.multiple) {\n-    var toSelect = [];\n-    var toUnselect = [];\n     var option;\n     for (var i = 0; i < node.options.length; i++) {\n       option = node.options[i];\n-      if (option.selected && -1 === value.indexOf(option.value)) {\n-        toUnselect.push(option);\n-      } else if (!option.selected && -1 !== value.indexOf(option.value)) {\n-        toSelect.push(option);\n+      if (option.selected) {\n+        browser.unselectOption(option);\n       }\n     }\n \n-    if (0 === toSelect.length && toUnselect.length > 0) {\n-      for (i = 1; i < toUnselect.length; i++) {\n-        toUnselect[i].selected = false;\n-      }\n-      browser.unselectOption(toUnselect[0]);\n-    } else if (toSelect.length) {\n-      for (i = 0; i < toUnselect.length; i++) {\n-        toUnselect[i].selected = false;\n-      }\n-      for (i = 1; i < toSelect.length; i++) {\n-        toUnselect[i].selected = true;\n-      }\n-      browser.selectOption(toSelect[0]);\n-    }\n+    value.forEach(function(optionValue) {\n+        browser.select(node, optionValue);","path":"src/ZombieDriver.php","position":33,"original_position":33,"commit_id":"ad2c3e953bd248f8a5f91ebfd4be424e93049a36","original_commit_id":"ad2c3e953bd248f8a5f91ebfd4be424e93049a36","user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"body":"This is not good, because it will trigger `change` JS event for each option being selected.","created_at":"2016-07-11T21:10:37Z","updated_at":"2016-07-11T21:10:37Z","html_url":"https://github.com/minkphp/MinkZombieDriver/pull/173#discussion_r70337825","pull_request_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173","_links":{"self":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/comments/70337825"},"html":{"href":"https://github.com/minkphp/MinkZombieDriver/pull/173#discussion_r70337825"},"pull_request":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173"}}},"pull_request":{"url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173","id":76998373,"html_url":"https://github.com/minkphp/MinkZombieDriver/pull/173","diff_url":"https://github.com/minkphp/MinkZombieDriver/pull/173.diff","patch_url":"https://github.com/minkphp/MinkZombieDriver/pull/173.patch","issue_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues/173","number":173,"state":"open","locked":false,"title":"Added posibility select option by text","user":{"login":"spolischook","id":1978331,"avatar_url":"https://avatars.githubusercontent.com/u/1978331?v=3","gravatar_id":"","url":"https://api.github.com/users/spolischook","html_url":"https://github.com/spolischook","followers_url":"https://api.github.com/users/spolischook/followers","following_url":"https://api.github.com/users/spolischook/following{/other_user}","gists_url":"https://api.github.com/users/spolischook/gists{/gist_id}","starred_url":"https://api.github.com/users/spolischook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spolischook/subscriptions","organizations_url":"https://api.github.com/users/spolischook/orgs","repos_url":"https://api.github.com/users/spolischook/repos","events_url":"https://api.github.com/users/spolischook/events{/privacy}","received_events_url":"https://api.github.com/users/spolischook/received_events","type":"User","site_admin":false},"body":"According to conversations\r\nminkphp/MinkSelenium2Driver#240\r\nminkphp/Mink#710","created_at":"2016-07-11T18:12:59Z","updated_at":"2016-07-11T21:10:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40b62f50d7814b13f28ae430492f4cb499ed8c1a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173/commits","review_comments_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173/comments","review_comment_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues/173/comments","statuses_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/statuses/ad2c3e953bd248f8a5f91ebfd4be424e93049a36","head":{"label":"spolischook:select-value-by-option-text","ref":"select-value-by-option-text","sha":"ad2c3e953bd248f8a5f91ebfd4be424e93049a36","user":{"login":"spolischook","id":1978331,"avatar_url":"https://avatars.githubusercontent.com/u/1978331?v=3","gravatar_id":"","url":"https://api.github.com/users/spolischook","html_url":"https://github.com/spolischook","followers_url":"https://api.github.com/users/spolischook/followers","following_url":"https://api.github.com/users/spolischook/following{/other_user}","gists_url":"https://api.github.com/users/spolischook/gists{/gist_id}","starred_url":"https://api.github.com/users/spolischook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spolischook/subscriptions","organizations_url":"https://api.github.com/users/spolischook/orgs","repos_url":"https://api.github.com/users/spolischook/repos","events_url":"https://api.github.com/users/spolischook/events{/privacy}","received_events_url":"https://api.github.com/users/spolischook/received_events","type":"User","site_admin":false},"repo":{"id":63079019,"name":"MinkZombieDriver","full_name":"spolischook/MinkZombieDriver","owner":{"login":"spolischook","id":1978331,"avatar_url":"https://avatars.githubusercontent.com/u/1978331?v=3","gravatar_id":"","url":"https://api.github.com/users/spolischook","html_url":"https://github.com/spolischook","followers_url":"https://api.github.com/users/spolischook/followers","following_url":"https://api.github.com/users/spolischook/following{/other_user}","gists_url":"https://api.github.com/users/spolischook/gists{/gist_id}","starred_url":"https://api.github.com/users/spolischook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spolischook/subscriptions","organizations_url":"https://api.github.com/users/spolischook/orgs","repos_url":"https://api.github.com/users/spolischook/repos","events_url":"https://api.github.com/users/spolischook/events{/privacy}","received_events_url":"https://api.github.com/users/spolischook/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spolischook/MinkZombieDriver","description":"Zombie.js driver for Mink framework","fork":true,"url":"https://api.github.com/repos/spolischook/MinkZombieDriver","forks_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/forks","keys_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/teams","hooks_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/hooks","issue_events_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/issues/events{/number}","events_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/events","assignees_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/assignees{/user}","branches_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/branches{/branch}","tags_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/tags","blobs_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/statuses/{sha}","languages_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/languages","stargazers_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/stargazers","contributors_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/contributors","subscribers_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/subscribers","subscription_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/subscription","commits_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/contents/{+path}","compare_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/merges","archive_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/downloads","issues_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/issues{/number}","pulls_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/pulls{/number}","milestones_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/milestones{/number}","notifications_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/labels{/name}","releases_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/releases{/id}","deployments_url":"https://api.github.com/repos/spolischook/MinkZombieDriver/deployments","created_at":"2016-07-11T15:20:13Z","updated_at":"2016-07-11T15:20:14Z","pushed_at":"2016-07-11T20:16:54Z","git_url":"git://github.com/spolischook/MinkZombieDriver.git","ssh_url":"git@github.com:spolischook/MinkZombieDriver.git","clone_url":"https://github.com/spolischook/MinkZombieDriver.git","svn_url":"https://github.com/spolischook/MinkZombieDriver","homepage":null,"size":193,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"minkphp:master","ref":"master","sha":"9c8b450cf1a4bd0a87c4d9cb783baec3c2c88d16","user":{"login":"minkphp","id":10380339,"avatar_url":"https://avatars.githubusercontent.com/u/10380339?v=3","gravatar_id":"","url":"https://api.github.com/users/minkphp","html_url":"https://github.com/minkphp","followers_url":"https://api.github.com/users/minkphp/followers","following_url":"https://api.github.com/users/minkphp/following{/other_user}","gists_url":"https://api.github.com/users/minkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/minkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minkphp/subscriptions","organizations_url":"https://api.github.com/users/minkphp/orgs","repos_url":"https://api.github.com/users/minkphp/repos","events_url":"https://api.github.com/users/minkphp/events{/privacy}","received_events_url":"https://api.github.com/users/minkphp/received_events","type":"Organization","site_admin":false},"repo":{"id":4487335,"name":"MinkZombieDriver","full_name":"minkphp/MinkZombieDriver","owner":{"login":"minkphp","id":10380339,"avatar_url":"https://avatars.githubusercontent.com/u/10380339?v=3","gravatar_id":"","url":"https://api.github.com/users/minkphp","html_url":"https://github.com/minkphp","followers_url":"https://api.github.com/users/minkphp/followers","following_url":"https://api.github.com/users/minkphp/following{/other_user}","gists_url":"https://api.github.com/users/minkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/minkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minkphp/subscriptions","organizations_url":"https://api.github.com/users/minkphp/orgs","repos_url":"https://api.github.com/users/minkphp/repos","events_url":"https://api.github.com/users/minkphp/events{/privacy}","received_events_url":"https://api.github.com/users/minkphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minkphp/MinkZombieDriver","description":"Zombie.js driver for Mink framework","fork":false,"url":"https://api.github.com/repos/minkphp/MinkZombieDriver","forks_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/forks","keys_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/teams","hooks_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/hooks","issue_events_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues/events{/number}","events_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/events","assignees_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/assignees{/user}","branches_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/branches{/branch}","tags_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/tags","blobs_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/statuses/{sha}","languages_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/languages","stargazers_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/stargazers","contributors_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/contributors","subscribers_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/subscribers","subscription_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/subscription","commits_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/contents/{+path}","compare_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/merges","archive_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/downloads","issues_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues{/number}","pulls_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls{/number}","milestones_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/milestones{/number}","notifications_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/labels{/name}","releases_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/releases{/id}","deployments_url":"https://api.github.com/repos/minkphp/MinkZombieDriver/deployments","created_at":"2012-05-29T20:44:51Z","updated_at":"2016-06-16T00:17:58Z","pushed_at":"2016-07-11T20:16:55Z","git_url":"git://github.com/minkphp/MinkZombieDriver.git","ssh_url":"git@github.com:minkphp/MinkZombieDriver.git","clone_url":"https://github.com/minkphp/MinkZombieDriver.git","svn_url":"https://github.com/minkphp/MinkZombieDriver","homepage":null,"size":291,"stargazers_count":30,"watchers_count":30,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":17,"forks":37,"open_issues":17,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173"},"html":{"href":"https://github.com/minkphp/MinkZombieDriver/pull/173"},"issue":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues/173"},"comments":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/issues/173/comments"},"review_comments":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173/comments"},"review_comment":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/pulls/173/commits"},"statuses":{"href":"https://api.github.com/repos/minkphp/MinkZombieDriver/statuses/ad2c3e953bd248f8a5f91ebfd4be424e93049a36"}}}}
{"actor":{"display_login":"aik099"}}