{"action":"created","comment":{"url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/comments/43756642","id":43756642,"diff_hunk":"@@ -602,41 +602,54 @@ def page_should_not_contain_image(self, locator, message='', loglevel='INFO'):\n     def get_matching_xpath_count(self, xpath):\n         \"\"\"Returns number of elements matching `xpath`\n \n-        One should not use the xpath= prefix for 'xpath'. XPath is assumed.\n+        As of release 1.8 `Get Matching Xpath Count` allows the\n+        argument `xpath` to start with the xpath= locator strategy.\n \n-        Correct:\n+        Example:\n         | count = | Get Matching Xpath Count | //div[@id='sales-pop']\n-        Incorrect:\n         | count = | Get Matching Xpath Count | xpath=//div[@id='sales-pop']\n \n         If you wish to assert the number of matching elements, use\n         `Xpath Should Match X Times`.\n         \"\"\"\n-        count = len(self._element_find(\"xpath=\" + xpath, False, False))\n-        return str(count)\n+        if xpath.startswith('//'):\n+            xpath = \"xpath=\" + xpath\n+        \n+        if xpath.startswith('xpath='):","path":"src/Selenium2Library/keywords/_element.py","position":22,"original_position":22,"commit_id":"c9ea25d736a5c44feffadb7a8b5001e754fe64a5","original_commit_id":"c9ea25d736a5c44feffadb7a8b5001e754fe64a5","user":{"login":"ombre42","id":1576672,"avatar_url":"https://avatars.githubusercontent.com/u/1576672?v=3","gravatar_id":"","url":"https://api.github.com/users/ombre42","html_url":"https://github.com/ombre42","followers_url":"https://api.github.com/users/ombre42/followers","following_url":"https://api.github.com/users/ombre42/following{/other_user}","gists_url":"https://api.github.com/users/ombre42/gists{/gist_id}","starred_url":"https://api.github.com/users/ombre42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ombre42/subscriptions","organizations_url":"https://api.github.com/users/ombre42/orgs","repos_url":"https://api.github.com/users/ombre42/repos","events_url":"https://api.github.com/users/ombre42/events{/privacy}","received_events_url":"https://api.github.com/users/ombre42/received_events","type":"User","site_admin":false},"body":"The detection of the xpath locator prefix is both case- and space-sensitive. This is not consistent with S2L.","created_at":"2015-11-03T14:57:50Z","updated_at":"2015-11-03T14:57:50Z","html_url":"https://github.com/robotframework/Selenium2Library/pull/527#discussion_r43756642","pull_request_url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527","_links":{"self":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/comments/43756642"},"html":{"href":"https://github.com/robotframework/Selenium2Library/pull/527#discussion_r43756642"},"pull_request":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527"}}},"pull_request":{"url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527","id":49507639,"html_url":"https://github.com/robotframework/Selenium2Library/pull/527","diff_url":"https://github.com/robotframework/Selenium2Library/pull/527.diff","patch_url":"https://github.com/robotframework/Selenium2Library/pull/527.patch","issue_url":"https://api.github.com/repos/robotframework/Selenium2Library/issues/527","number":527,"state":"open","locked":false,"title":"Allow locator strategy of xpath= for matching xpath keywords.","user":{"login":"emanlove","id":993527,"avatar_url":"https://avatars.githubusercontent.com/u/993527?v=3","gravatar_id":"","url":"https://api.github.com/users/emanlove","html_url":"https://github.com/emanlove","followers_url":"https://api.github.com/users/emanlove/followers","following_url":"https://api.github.com/users/emanlove/following{/other_user}","gists_url":"https://api.github.com/users/emanlove/gists{/gist_id}","starred_url":"https://api.github.com/users/emanlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanlove/subscriptions","organizations_url":"https://api.github.com/users/emanlove/orgs","repos_url":"https://api.github.com/users/emanlove/repos","events_url":"https://api.github.com/users/emanlove/events{/privacy}","received_events_url":"https://api.github.com/users/emanlove/received_events","type":"User","site_admin":false},"body":"Fixes #526.","created_at":"2015-11-03T00:51:03Z","updated_at":"2015-11-03T14:57:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db11b22e20eea0ef6f3e7219ea0aa8de8229b6a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527/commits","review_comments_url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527/comments","review_comment_url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/robotframework/Selenium2Library/issues/527/comments","statuses_url":"https://api.github.com/repos/robotframework/Selenium2Library/statuses/c9ea25d736a5c44feffadb7a8b5001e754fe64a5","head":{"label":"emanlove:matching-xpath","ref":"matching-xpath","sha":"c9ea25d736a5c44feffadb7a8b5001e754fe64a5","user":{"login":"emanlove","id":993527,"avatar_url":"https://avatars.githubusercontent.com/u/993527?v=3","gravatar_id":"","url":"https://api.github.com/users/emanlove","html_url":"https://github.com/emanlove","followers_url":"https://api.github.com/users/emanlove/followers","following_url":"https://api.github.com/users/emanlove/following{/other_user}","gists_url":"https://api.github.com/users/emanlove/gists{/gist_id}","starred_url":"https://api.github.com/users/emanlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanlove/subscriptions","organizations_url":"https://api.github.com/users/emanlove/orgs","repos_url":"https://api.github.com/users/emanlove/repos","events_url":"https://api.github.com/users/emanlove/events{/privacy}","received_events_url":"https://api.github.com/users/emanlove/received_events","type":"User","site_admin":false},"repo":{"id":2973019,"name":"robotframework-selenium2library","full_name":"emanlove/robotframework-selenium2library","owner":{"login":"emanlove","id":993527,"avatar_url":"https://avatars.githubusercontent.com/u/993527?v=3","gravatar_id":"","url":"https://api.github.com/users/emanlove","html_url":"https://github.com/emanlove","followers_url":"https://api.github.com/users/emanlove/followers","following_url":"https://api.github.com/users/emanlove/following{/other_user}","gists_url":"https://api.github.com/users/emanlove/gists{/gist_id}","starred_url":"https://api.github.com/users/emanlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanlove/subscriptions","organizations_url":"https://api.github.com/users/emanlove/orgs","repos_url":"https://api.github.com/users/emanlove/repos","events_url":"https://api.github.com/users/emanlove/events{/privacy}","received_events_url":"https://api.github.com/users/emanlove/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emanlove/robotframework-selenium2library","description":"Web testing library for Robot Framework","fork":true,"url":"https://api.github.com/repos/emanlove/robotframework-selenium2library","forks_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/forks","keys_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/teams","hooks_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/hooks","issue_events_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/issues/events{/number}","events_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/events","assignees_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/assignees{/user}","branches_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/branches{/branch}","tags_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/tags","blobs_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/git/refs{/sha}","trees_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/statuses/{sha}","languages_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/languages","stargazers_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/stargazers","contributors_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/contributors","subscribers_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/subscribers","subscription_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/subscription","commits_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/commits{/sha}","git_commits_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/git/commits{/sha}","comments_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/comments{/number}","issue_comment_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/issues/comments{/number}","contents_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/contents/{+path}","compare_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/merges","archive_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/downloads","issues_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/issues{/number}","pulls_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/pulls{/number}","milestones_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/milestones{/number}","notifications_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/labels{/name}","releases_url":"https://api.github.com/repos/emanlove/robotframework-selenium2library/releases{/id}","created_at":"2011-12-13T15:09:55Z","updated_at":"2015-05-27T02:39:49Z","pushed_at":"2015-11-03T00:49:32Z","git_url":"git://github.com/emanlove/robotframework-selenium2library.git","ssh_url":"git@github.com:emanlove/robotframework-selenium2library.git","clone_url":"https://github.com/emanlove/robotframework-selenium2library.git","svn_url":"https://github.com/emanlove/robotframework-selenium2library","homepage":"","size":110846,"stargazers_count":12,"watchers_count":12,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":12,"default_branch":"master"}},"base":{"label":"robotframework:master","ref":"master","sha":"2685fc712af372c20e8cf8f5bebdbac0183f407b","user":{"login":"robotframework","id":574284,"avatar_url":"https://avatars.githubusercontent.com/u/574284?v=3","gravatar_id":"","url":"https://api.github.com/users/robotframework","html_url":"https://github.com/robotframework","followers_url":"https://api.github.com/users/robotframework/followers","following_url":"https://api.github.com/users/robotframework/following{/other_user}","gists_url":"https://api.github.com/users/robotframework/gists{/gist_id}","starred_url":"https://api.github.com/users/robotframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotframework/subscriptions","organizations_url":"https://api.github.com/users/robotframework/orgs","repos_url":"https://api.github.com/users/robotframework/repos","events_url":"https://api.github.com/users/robotframework/events{/privacy}","received_events_url":"https://api.github.com/users/robotframework/received_events","type":"Organization","site_admin":false},"repo":{"id":2625205,"name":"Selenium2Library","full_name":"robotframework/Selenium2Library","owner":{"login":"robotframework","id":574284,"avatar_url":"https://avatars.githubusercontent.com/u/574284?v=3","gravatar_id":"","url":"https://api.github.com/users/robotframework","html_url":"https://github.com/robotframework","followers_url":"https://api.github.com/users/robotframework/followers","following_url":"https://api.github.com/users/robotframework/following{/other_user}","gists_url":"https://api.github.com/users/robotframework/gists{/gist_id}","starred_url":"https://api.github.com/users/robotframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotframework/subscriptions","organizations_url":"https://api.github.com/users/robotframework/orgs","repos_url":"https://api.github.com/users/robotframework/repos","events_url":"https://api.github.com/users/robotframework/events{/privacy}","received_events_url":"https://api.github.com/users/robotframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/robotframework/Selenium2Library","description":"Web testing library for Robot Framework","fork":false,"url":"https://api.github.com/repos/robotframework/Selenium2Library","forks_url":"https://api.github.com/repos/robotframework/Selenium2Library/forks","keys_url":"https://api.github.com/repos/robotframework/Selenium2Library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robotframework/Selenium2Library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robotframework/Selenium2Library/teams","hooks_url":"https://api.github.com/repos/robotframework/Selenium2Library/hooks","issue_events_url":"https://api.github.com/repos/robotframework/Selenium2Library/issues/events{/number}","events_url":"https://api.github.com/repos/robotframework/Selenium2Library/events","assignees_url":"https://api.github.com/repos/robotframework/Selenium2Library/assignees{/user}","branches_url":"https://api.github.com/repos/robotframework/Selenium2Library/branches{/branch}","tags_url":"https://api.github.com/repos/robotframework/Selenium2Library/tags","blobs_url":"https://api.github.com/repos/robotframework/Selenium2Library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robotframework/Selenium2Library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robotframework/Selenium2Library/git/refs{/sha}","trees_url":"https://api.github.com/repos/robotframework/Selenium2Library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robotframework/Selenium2Library/statuses/{sha}","languages_url":"https://api.github.com/repos/robotframework/Selenium2Library/languages","stargazers_url":"https://api.github.com/repos/robotframework/Selenium2Library/stargazers","contributors_url":"https://api.github.com/repos/robotframework/Selenium2Library/contributors","subscribers_url":"https://api.github.com/repos/robotframework/Selenium2Library/subscribers","subscription_url":"https://api.github.com/repos/robotframework/Selenium2Library/subscription","commits_url":"https://api.github.com/repos/robotframework/Selenium2Library/commits{/sha}","git_commits_url":"https://api.github.com/repos/robotframework/Selenium2Library/git/commits{/sha}","comments_url":"https://api.github.com/repos/robotframework/Selenium2Library/comments{/number}","issue_comment_url":"https://api.github.com/repos/robotframework/Selenium2Library/issues/comments{/number}","contents_url":"https://api.github.com/repos/robotframework/Selenium2Library/contents/{+path}","compare_url":"https://api.github.com/repos/robotframework/Selenium2Library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robotframework/Selenium2Library/merges","archive_url":"https://api.github.com/repos/robotframework/Selenium2Library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robotframework/Selenium2Library/downloads","issues_url":"https://api.github.com/repos/robotframework/Selenium2Library/issues{/number}","pulls_url":"https://api.github.com/repos/robotframework/Selenium2Library/pulls{/number}","milestones_url":"https://api.github.com/repos/robotframework/Selenium2Library/milestones{/number}","notifications_url":"https://api.github.com/repos/robotframework/Selenium2Library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robotframework/Selenium2Library/labels{/name}","releases_url":"https://api.github.com/repos/robotframework/Selenium2Library/releases{/id}","created_at":"2011-10-22T08:01:34Z","updated_at":"2015-10-30T09:38:30Z","pushed_at":"2015-11-03T00:51:04Z","git_url":"git://github.com/robotframework/Selenium2Library.git","ssh_url":"git@github.com:robotframework/Selenium2Library.git","clone_url":"https://github.com/robotframework/Selenium2Library.git","svn_url":"https://github.com/robotframework/Selenium2Library","homepage":"","size":113222,"stargazers_count":249,"watchers_count":249,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":221,"mirror_url":null,"open_issues_count":128,"forks":221,"open_issues":128,"watchers":249,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527"},"html":{"href":"https://github.com/robotframework/Selenium2Library/pull/527"},"issue":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/issues/527"},"comments":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/issues/527/comments"},"review_comments":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527/comments"},"review_comment":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/pulls/527/commits"},"statuses":{"href":"https://api.github.com/repos/robotframework/Selenium2Library/statuses/c9ea25d736a5c44feffadb7a8b5001e754fe64a5"}}}}