{"action":"created","comment":{"url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/comments/174378828","pull_request_review_id":103721223,"id":174378828,"diff_hunk":"@@ -0,0 +1,152 @@\n+package com.epam.page.object.generator.model.searchrule;\n+\n+import com.codeborne.selenide.ElementsCollection;\n+import com.epam.page.object.generator.error.XpathToCssTransformerException;\n+import com.epam.page.object.generator.model.ClassAndAnnotationPair;\n+import com.epam.page.object.generator.model.Selector;\n+import com.epam.page.object.generator.model.webelement.CommonWebElement;\n+import com.epam.page.object.generator.model.webelement.SelenideWebElement;\n+import com.epam.page.object.generator.model.webelement.WebElement;\n+import com.epam.page.object.generator.model.webgroup.CommonWebElementGroup;\n+import com.epam.page.object.generator.model.webgroup.SelenideWebElementGroup;\n+import com.epam.page.object.generator.model.webgroup.WebElementGroup;\n+import com.epam.page.object.generator.util.SearchRuleType;\n+import com.epam.page.object.generator.util.SelectorUtils;\n+import com.epam.page.object.generator.util.XpathToCssTransformer;\n+import com.epam.page.object.generator.validator.ValidationResult;\n+import com.epam.page.object.generator.validator.ValidatorVisitor;\n+import org.jsoup.nodes.Element;\n+import org.jsoup.select.Elements;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+/**\n+ * {@link SelenideSearchRule} describes {@link SearchRule} with one of the type defined in property\n+ * file in 'commonSearchRule' group.\n+ */\n+public class SelenideSearchRule implements SearchRule {\n+\n+    private String uniqueness;\n+    private SearchRuleType type;\n+    private Selector selector;\n+    private ClassAndAnnotationPair classAndAnnotation;\n+    private XpathToCssTransformer transformer;\n+    private SelectorUtils selectorUtils;\n+    private boolean annotation;\n+\n+    private List<ValidationResult> validationResults = new ArrayList<>();\n+    private final static Logger logger = LoggerFactory.getLogger(SelenideSearchRule.class);\n+\n+    public SelenideSearchRule(String uniqueness, SearchRuleType type, Selector selector,\n+                              ClassAndAnnotationPair classAndAnnotation,\n+                              XpathToCssTransformer transformer,\n+                              SelectorUtils selectorUtils,\n+                              boolean annotation) {\n+        this.uniqueness = uniqueness;\n+        this.type = type;\n+        this.selector = selector;\n+        this.annotation = annotation;\n+        this.classAndAnnotation = classAndAnnotation;\n+        this.transformer = transformer;\n+        this.selectorUtils = selectorUtils;\n+    }\n+\n+    public String getUniqueness() {\n+        return uniqueness;\n+    }\n+\n+    public SearchRuleType getType() {\n+        return type;\n+    }\n+\n+    private String getRequiredValue(Element element) {","path":"src/main/java/com/epam/page/object/generator/model/searchrule/SelenideSearchRule.java","position":65,"original_position":65,"commit_id":"fdef585ab67b6b1ae35ff63aa4fa75f31d752c2d","original_commit_id":"db16751a8f6b53bab49381939a5148ec3a777ca8","user":{"login":"IvanovYura","id":1702473,"avatar_url":"https://avatars0.githubusercontent.com/u/1702473?v=4","gravatar_id":"","url":"https://api.github.com/users/IvanovYura","html_url":"https://github.com/IvanovYura","followers_url":"https://api.github.com/users/IvanovYura/followers","following_url":"https://api.github.com/users/IvanovYura/following{/other_user}","gists_url":"https://api.github.com/users/IvanovYura/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanovYura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanovYura/subscriptions","organizations_url":"https://api.github.com/users/IvanovYura/orgs","repos_url":"https://api.github.com/users/IvanovYura/repos","events_url":"https://api.github.com/users/IvanovYura/events{/privacy}","received_events_url":"https://api.github.com/users/IvanovYura/received_events","type":"User","site_admin":false},"body":"When we were working on this task we find that we have to do a lot of copy-paste just to add a new Builder. Currently rewriting could take a lot of efforts.","created_at":"2018-03-14T08:14:19Z","updated_at":"2018-03-14T08:14:19Z","html_url":"https://github.com/TAI-EPAM/page-objects-generator/pull/36#discussion_r174378828","pull_request_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/comments/174378828"},"html":{"href":"https://github.com/TAI-EPAM/page-objects-generator/pull/36#discussion_r174378828"},"pull_request":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36"}},"in_reply_to_id":174086122},"pull_request":{"url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36","id":173957060,"html_url":"https://github.com/TAI-EPAM/page-objects-generator/pull/36","diff_url":"https://github.com/TAI-EPAM/page-objects-generator/pull/36.diff","patch_url":"https://github.com/TAI-EPAM/page-objects-generator/pull/36.patch","issue_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/36","number":36,"state":"open","locked":false,"title":"Epmlstrtai 262","user":{"login":"IvanovYura","id":1702473,"avatar_url":"https://avatars0.githubusercontent.com/u/1702473?v=4","gravatar_id":"","url":"https://api.github.com/users/IvanovYura","html_url":"https://github.com/IvanovYura","followers_url":"https://api.github.com/users/IvanovYura/followers","following_url":"https://api.github.com/users/IvanovYura/following{/other_user}","gists_url":"https://api.github.com/users/IvanovYura/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanovYura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanovYura/subscriptions","organizations_url":"https://api.github.com/users/IvanovYura/orgs","repos_url":"https://api.github.com/users/IvanovYura/repos","events_url":"https://api.github.com/users/IvanovYura/events{/privacy}","received_events_url":"https://api.github.com/users/IvanovYura/received_events","type":"User","site_admin":false},"body":"Finished 2 builders for Selenide ElementsCollection, List<WebElements>.\r\nSelenideElement and WebElemen were added to commonSearchRule.","created_at":"2018-03-09T09:29:48Z","updated_at":"2018-03-14T08:14:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[{"login":"hdghg","id":10245343,"avatar_url":"https://avatars1.githubusercontent.com/u/10245343?v=4","gravatar_id":"","url":"https://api.github.com/users/hdghg","html_url":"https://github.com/hdghg","followers_url":"https://api.github.com/users/hdghg/followers","following_url":"https://api.github.com/users/hdghg/following{/other_user}","gists_url":"https://api.github.com/users/hdghg/gists{/gist_id}","starred_url":"https://api.github.com/users/hdghg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdghg/subscriptions","organizations_url":"https://api.github.com/users/hdghg/orgs","repos_url":"https://api.github.com/users/hdghg/repos","events_url":"https://api.github.com/users/hdghg/events{/privacy}","received_events_url":"https://api.github.com/users/hdghg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36/commits","review_comments_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36/comments","review_comment_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/36/comments","statuses_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/statuses/fdef585ab67b6b1ae35ff63aa4fa75f31d752c2d","head":{"label":"TAI-EPAM:EPMLSTRTAI-262","ref":"EPMLSTRTAI-262","sha":"fdef585ab67b6b1ae35ff63aa4fa75f31d752c2d","user":{"login":"TAI-EPAM","id":32369530,"avatar_url":"https://avatars2.githubusercontent.com/u/32369530?v=4","gravatar_id":"","url":"https://api.github.com/users/TAI-EPAM","html_url":"https://github.com/TAI-EPAM","followers_url":"https://api.github.com/users/TAI-EPAM/followers","following_url":"https://api.github.com/users/TAI-EPAM/following{/other_user}","gists_url":"https://api.github.com/users/TAI-EPAM/gists{/gist_id}","starred_url":"https://api.github.com/users/TAI-EPAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAI-EPAM/subscriptions","organizations_url":"https://api.github.com/users/TAI-EPAM/orgs","repos_url":"https://api.github.com/users/TAI-EPAM/repos","events_url":"https://api.github.com/users/TAI-EPAM/events{/privacy}","received_events_url":"https://api.github.com/users/TAI-EPAM/received_events","type":"Organization","site_admin":false},"repo":{"id":107145218,"name":"page-objects-generator","full_name":"TAI-EPAM/page-objects-generator","owner":{"login":"TAI-EPAM","id":32369530,"avatar_url":"https://avatars2.githubusercontent.com/u/32369530?v=4","gravatar_id":"","url":"https://api.github.com/users/TAI-EPAM","html_url":"https://github.com/TAI-EPAM","followers_url":"https://api.github.com/users/TAI-EPAM/followers","following_url":"https://api.github.com/users/TAI-EPAM/following{/other_user}","gists_url":"https://api.github.com/users/TAI-EPAM/gists{/gist_id}","starred_url":"https://api.github.com/users/TAI-EPAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAI-EPAM/subscriptions","organizations_url":"https://api.github.com/users/TAI-EPAM/orgs","repos_url":"https://api.github.com/users/TAI-EPAM/repos","events_url":"https://api.github.com/users/TAI-EPAM/events{/privacy}","received_events_url":"https://api.github.com/users/TAI-EPAM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TAI-EPAM/page-objects-generator","description":"This is simple library which can generate pageobjects for any site","fork":true,"url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator","forks_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/forks","keys_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/teams","hooks_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/hooks","issue_events_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/events{/number}","events_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/events","assignees_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/assignees{/user}","branches_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/branches{/branch}","tags_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/tags","blobs_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/languages","stargazers_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/stargazers","contributors_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/contributors","subscribers_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/subscribers","subscription_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/subscription","commits_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/contents/{+path}","compare_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/merges","archive_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/downloads","issues_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues{/number}","pulls_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/labels{/name}","releases_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/releases{/id}","deployments_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/deployments","created_at":"2017-10-16T15:17:27Z","updated_at":"2018-03-13T10:42:58Z","pushed_at":"2018-03-13T15:58:15Z","git_url":"git://github.com/TAI-EPAM/page-objects-generator.git","ssh_url":"git@github.com:TAI-EPAM/page-objects-generator.git","clone_url":"https://github.com/TAI-EPAM/page-objects-generator.git","svn_url":"https://github.com/TAI-EPAM/page-objects-generator","homepage":null,"size":691,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"TAI-EPAM:master","ref":"master","sha":"c64045fb8310665ba400aab8c31a7a15aadc6fc0","user":{"login":"TAI-EPAM","id":32369530,"avatar_url":"https://avatars2.githubusercontent.com/u/32369530?v=4","gravatar_id":"","url":"https://api.github.com/users/TAI-EPAM","html_url":"https://github.com/TAI-EPAM","followers_url":"https://api.github.com/users/TAI-EPAM/followers","following_url":"https://api.github.com/users/TAI-EPAM/following{/other_user}","gists_url":"https://api.github.com/users/TAI-EPAM/gists{/gist_id}","starred_url":"https://api.github.com/users/TAI-EPAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAI-EPAM/subscriptions","organizations_url":"https://api.github.com/users/TAI-EPAM/orgs","repos_url":"https://api.github.com/users/TAI-EPAM/repos","events_url":"https://api.github.com/users/TAI-EPAM/events{/privacy}","received_events_url":"https://api.github.com/users/TAI-EPAM/received_events","type":"Organization","site_admin":false},"repo":{"id":107145218,"name":"page-objects-generator","full_name":"TAI-EPAM/page-objects-generator","owner":{"login":"TAI-EPAM","id":32369530,"avatar_url":"https://avatars2.githubusercontent.com/u/32369530?v=4","gravatar_id":"","url":"https://api.github.com/users/TAI-EPAM","html_url":"https://github.com/TAI-EPAM","followers_url":"https://api.github.com/users/TAI-EPAM/followers","following_url":"https://api.github.com/users/TAI-EPAM/following{/other_user}","gists_url":"https://api.github.com/users/TAI-EPAM/gists{/gist_id}","starred_url":"https://api.github.com/users/TAI-EPAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAI-EPAM/subscriptions","organizations_url":"https://api.github.com/users/TAI-EPAM/orgs","repos_url":"https://api.github.com/users/TAI-EPAM/repos","events_url":"https://api.github.com/users/TAI-EPAM/events{/privacy}","received_events_url":"https://api.github.com/users/TAI-EPAM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TAI-EPAM/page-objects-generator","description":"This is simple library which can generate pageobjects for any site","fork":true,"url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator","forks_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/forks","keys_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/teams","hooks_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/hooks","issue_events_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/events{/number}","events_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/events","assignees_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/assignees{/user}","branches_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/branches{/branch}","tags_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/tags","blobs_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/languages","stargazers_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/stargazers","contributors_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/contributors","subscribers_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/subscribers","subscription_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/subscription","commits_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/contents/{+path}","compare_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/merges","archive_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/downloads","issues_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues{/number}","pulls_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/labels{/name}","releases_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/releases{/id}","deployments_url":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/deployments","created_at":"2017-10-16T15:17:27Z","updated_at":"2018-03-13T10:42:58Z","pushed_at":"2018-03-13T15:58:15Z","git_url":"git://github.com/TAI-EPAM/page-objects-generator.git","ssh_url":"git@github.com:TAI-EPAM/page-objects-generator.git","clone_url":"https://github.com/TAI-EPAM/page-objects-generator.git","svn_url":"https://github.com/TAI-EPAM/page-objects-generator","homepage":null,"size":691,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36"},"html":{"href":"https://github.com/TAI-EPAM/page-objects-generator/pull/36"},"issue":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/36"},"comments":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/TAI-EPAM/page-objects-generator/statuses/fdef585ab67b6b1ae35ff63aa4fa75f31d752c2d"}},"author_association":"NONE"}}
{"actor":{"display_login":"IvanovYura"}}