{"action":"created","comment":{"url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/comments/35311790","id":35311790,"diff_hunk":"@@ -23,46 +21,33 @@ internal class ElementsCommand : CommandBase\n \n         #region Public Methods and Operators\n \n-        public override string DoImpl()\n+        protected override string DoImpl()\n         {\n             var searchValue = this.Parameters[\"value\"].ToString();\n             var searchPolicy = this.Parameters[\"using\"].ToString();\n \n-            DependencyObject relativeElement = this.ElementId == null\n-                                                   ? this.Automator.VisualRoot\n-                                                   : this.Automator.WebElements.GetRegisteredElement(this.ElementId);\n-\n-            var result = new List<JsonWebElementContent>();\n             var searchStrategy = new By(searchPolicy, searchValue);\n-            var foundObjectsIdList = this.FindElementsBy(relativeElement, searchStrategy);\n-            result.AddRange(foundObjectsIdList.Select(foundObjectId => new JsonWebElementContent(foundObjectId)));\n+            List<WiniumElement> result;\n \n             if (this.ElementId == null)\n             {\n-                var popups = VisualTreeHelper.GetOpenPopups(Window.Current);\n-                foreach (var popupChild in popups.Select(popup => popup.Child))\n-                {\n-                    foundObjectsIdList = this.FindElementsBy(popupChild, searchStrategy);\n-                    result.AddRange(\n-                        foundObjectsIdList.Select(foundObjectId => new JsonWebElementContent(foundObjectId)));\n-                }\n+                result = WiniumVirtualRoot.Current.Find(TreeScope.Descendants, searchStrategy.Predicate).ToList();\n+            }\n+            else\n+            {\n+                var parentElement = this.Automator.ElementsRegistry.GetRegisteredElement(this.ElementId);\n+                result = parentElement.Find(TreeScope.Descendants, searchStrategy.Predicate).ToList();\n             }\n \n-            return this.JsonResponse(ResponseStatus.Success, result.ToArray());\n-        }\n-\n-        #endregion\n-\n-        #region Methods\n+            var registredObjects = new List<JsonWebElementContent>();","path":"Winium/Winium.StoreApps.InnerServer/Commands/ElementsCommand.cs","position":56,"original_position":56,"commit_id":"310a6bf5804a88d4706738e4ffab472021d688ab","original_commit_id":"310a6bf5804a88d4706738e4ffab472021d688ab","user":{"login":"skyline-gleb","id":4970194,"avatar_url":"https://avatars.githubusercontent.com/u/4970194?v=3","gravatar_id":"","url":"https://api.github.com/users/skyline-gleb","html_url":"https://github.com/skyline-gleb","followers_url":"https://api.github.com/users/skyline-gleb/followers","following_url":"https://api.github.com/users/skyline-gleb/following{/other_user}","gists_url":"https://api.github.com/users/skyline-gleb/gists{/gist_id}","starred_url":"https://api.github.com/users/skyline-gleb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyline-gleb/subscriptions","organizations_url":"https://api.github.com/users/skyline-gleb/orgs","repos_url":"https://api.github.com/users/skyline-gleb/repos","events_url":"https://api.github.com/users/skyline-gleb/events{/privacy}","received_events_url":"https://api.github.com/users/skyline-gleb/received_events","type":"User","site_admin":false},"body":"тут отступ поехал :)\r\nи хороший же нейминг без Web добавки","created_at":"2015-07-23T11:23:25Z","updated_at":"2015-07-23T11:23:25Z","html_url":"https://github.com/2gis/Winium.StoreApps/pull/51#discussion_r35311790","pull_request_url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/comments/35311790"},"html":{"href":"https://github.com/2gis/Winium.StoreApps/pull/51#discussion_r35311790"},"pull_request":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51","id":40528823,"html_url":"https://github.com/2gis/Winium.StoreApps/pull/51","diff_url":"https://github.com/2gis/Winium.StoreApps/pull/51.diff","patch_url":"https://github.com/2gis/Winium.StoreApps/pull/51.patch","issue_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/51","number":51,"state":"open","locked":false,"title":"Refactor element model","user":{"login":"NickAb","id":866739,"avatar_url":"https://avatars.githubusercontent.com/u/866739?v=3","gravatar_id":"","url":"https://api.github.com/users/NickAb","html_url":"https://github.com/NickAb","followers_url":"https://api.github.com/users/NickAb/followers","following_url":"https://api.github.com/users/NickAb/following{/other_user}","gists_url":"https://api.github.com/users/NickAb/gists{/gist_id}","starred_url":"https://api.github.com/users/NickAb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickAb/subscriptions","organizations_url":"https://api.github.com/users/NickAb/orgs","repos_url":"https://api.github.com/users/NickAb/repos","events_url":"https://api.github.com/users/NickAb/events{/privacy}","received_events_url":"https://api.github.com/users/NickAb/received_events","type":"User","site_admin":false},"body":"Moves scattered element logic to single WiniumElement class. Refactor find ocmmands to use virtual root, fix alert command, minor changes.\r\nFixes #49 \r\nFixes #40 ","created_at":"2015-07-22T04:11:38Z","updated_at":"2015-07-23T11:23:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b610f8a7c507ccb9ce009aa6dbf531da5af056b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51/commits","review_comments_url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51/comments","review_comment_url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/51/comments","statuses_url":"https://api.github.com/repos/2gis/Winium.StoreApps/statuses/310a6bf5804a88d4706738e4ffab472021d688ab","head":{"label":"2gis:refactor-element","ref":"refactor-element","sha":"310a6bf5804a88d4706738e4ffab472021d688ab","user":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"repo":{"id":30239701,"name":"Winium.StoreApps","full_name":"2gis/Winium.StoreApps","owner":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gis/Winium.StoreApps","description":"Winium.StoreApps is Selenium Remote WebDriver implementation for automated testing of Windows Store apps, tested on emulators (currently only Windows Phone apps are supported).","fork":false,"url":"https://api.github.com/repos/2gis/Winium.StoreApps","forks_url":"https://api.github.com/repos/2gis/Winium.StoreApps/forks","keys_url":"https://api.github.com/repos/2gis/Winium.StoreApps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gis/Winium.StoreApps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gis/Winium.StoreApps/teams","hooks_url":"https://api.github.com/repos/2gis/Winium.StoreApps/hooks","issue_events_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/events{/number}","events_url":"https://api.github.com/repos/2gis/Winium.StoreApps/events","assignees_url":"https://api.github.com/repos/2gis/Winium.StoreApps/assignees{/user}","branches_url":"https://api.github.com/repos/2gis/Winium.StoreApps/branches{/branch}","tags_url":"https://api.github.com/repos/2gis/Winium.StoreApps/tags","blobs_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gis/Winium.StoreApps/statuses/{sha}","languages_url":"https://api.github.com/repos/2gis/Winium.StoreApps/languages","stargazers_url":"https://api.github.com/repos/2gis/Winium.StoreApps/stargazers","contributors_url":"https://api.github.com/repos/2gis/Winium.StoreApps/contributors","subscribers_url":"https://api.github.com/repos/2gis/Winium.StoreApps/subscribers","subscription_url":"https://api.github.com/repos/2gis/Winium.StoreApps/subscription","commits_url":"https://api.github.com/repos/2gis/Winium.StoreApps/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gis/Winium.StoreApps/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gis/Winium.StoreApps/contents/{+path}","compare_url":"https://api.github.com/repos/2gis/Winium.StoreApps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gis/Winium.StoreApps/merges","archive_url":"https://api.github.com/repos/2gis/Winium.StoreApps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gis/Winium.StoreApps/downloads","issues_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues{/number}","pulls_url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls{/number}","milestones_url":"https://api.github.com/repos/2gis/Winium.StoreApps/milestones{/number}","notifications_url":"https://api.github.com/repos/2gis/Winium.StoreApps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gis/Winium.StoreApps/labels{/name}","releases_url":"https://api.github.com/repos/2gis/Winium.StoreApps/releases{/id}","created_at":"2015-02-03T11:33:30Z","updated_at":"2015-07-15T20:57:16Z","pushed_at":"2015-07-22T04:11:38Z","git_url":"git://github.com/2gis/Winium.StoreApps.git","ssh_url":"git@github.com:2gis/Winium.StoreApps.git","clone_url":"https://github.com/2gis/Winium.StoreApps.git","svn_url":"https://github.com/2gis/Winium.StoreApps","homepage":"","size":1256,"stargazers_count":12,"watchers_count":12,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":12,"forks":2,"open_issues":12,"watchers":12,"default_branch":"master"}},"base":{"label":"2gis:master","ref":"master","sha":"da4987dcb776649d9fc4eabb5b8a07cfa352a62f","user":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"repo":{"id":30239701,"name":"Winium.StoreApps","full_name":"2gis/Winium.StoreApps","owner":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gis/Winium.StoreApps","description":"Winium.StoreApps is Selenium Remote WebDriver implementation for automated testing of Windows Store apps, tested on emulators (currently only Windows Phone apps are supported).","fork":false,"url":"https://api.github.com/repos/2gis/Winium.StoreApps","forks_url":"https://api.github.com/repos/2gis/Winium.StoreApps/forks","keys_url":"https://api.github.com/repos/2gis/Winium.StoreApps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gis/Winium.StoreApps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gis/Winium.StoreApps/teams","hooks_url":"https://api.github.com/repos/2gis/Winium.StoreApps/hooks","issue_events_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/events{/number}","events_url":"https://api.github.com/repos/2gis/Winium.StoreApps/events","assignees_url":"https://api.github.com/repos/2gis/Winium.StoreApps/assignees{/user}","branches_url":"https://api.github.com/repos/2gis/Winium.StoreApps/branches{/branch}","tags_url":"https://api.github.com/repos/2gis/Winium.StoreApps/tags","blobs_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gis/Winium.StoreApps/statuses/{sha}","languages_url":"https://api.github.com/repos/2gis/Winium.StoreApps/languages","stargazers_url":"https://api.github.com/repos/2gis/Winium.StoreApps/stargazers","contributors_url":"https://api.github.com/repos/2gis/Winium.StoreApps/contributors","subscribers_url":"https://api.github.com/repos/2gis/Winium.StoreApps/subscribers","subscription_url":"https://api.github.com/repos/2gis/Winium.StoreApps/subscription","commits_url":"https://api.github.com/repos/2gis/Winium.StoreApps/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gis/Winium.StoreApps/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gis/Winium.StoreApps/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gis/Winium.StoreApps/contents/{+path}","compare_url":"https://api.github.com/repos/2gis/Winium.StoreApps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gis/Winium.StoreApps/merges","archive_url":"https://api.github.com/repos/2gis/Winium.StoreApps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gis/Winium.StoreApps/downloads","issues_url":"https://api.github.com/repos/2gis/Winium.StoreApps/issues{/number}","pulls_url":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls{/number}","milestones_url":"https://api.github.com/repos/2gis/Winium.StoreApps/milestones{/number}","notifications_url":"https://api.github.com/repos/2gis/Winium.StoreApps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gis/Winium.StoreApps/labels{/name}","releases_url":"https://api.github.com/repos/2gis/Winium.StoreApps/releases{/id}","created_at":"2015-02-03T11:33:30Z","updated_at":"2015-07-15T20:57:16Z","pushed_at":"2015-07-22T04:11:38Z","git_url":"git://github.com/2gis/Winium.StoreApps.git","ssh_url":"git@github.com:2gis/Winium.StoreApps.git","clone_url":"https://github.com/2gis/Winium.StoreApps.git","svn_url":"https://github.com/2gis/Winium.StoreApps","homepage":"","size":1256,"stargazers_count":12,"watchers_count":12,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":12,"forks":2,"open_issues":12,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51"},"html":{"href":"https://github.com/2gis/Winium.StoreApps/pull/51"},"issue":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/51"},"comments":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/2gis/Winium.StoreApps/statuses/310a6bf5804a88d4706738e4ffab472021d688ab"}}}}