{"action":"created","comment":{"url":"https://api.github.com/repos/autoschool/practice2016/pulls/comments/60853025","id":60853025,"diff_hunk":"@@ -1,38 +1,83 @@\n package ru.qatools.school.steps.websteps;\n \n+import org.openqa.selenium.Keys;\n import org.openqa.selenium.WebDriver;\n import org.openqa.selenium.WebElement;\n-import ru.qatools.school.pages.MainPage;\n import ru.yandex.qatools.allure.annotations.Step;\n+import ru.yandex.qatools.htmlelements.element.HtmlElement;\n+\n+import java.util.ArrayList;\n+import java.util.Collection;\n+import java.util.List;\n \n import static java.lang.String.format;\n+import static org.hamcrest.collection.IsCollectionWithSize.hasSize;\n+import static org.hamcrest.core.CombinableMatcher.both;\n+import static org.hamcrest.core.Every.everyItem;\n import static org.junit.Assert.assertThat;\n import static ru.yandex.qatools.htmlelements.matchers.WebElementMatchers.isDisplayed;\n+import static ru.yandex.qatools.htmlelements.matchers.common.DoesElementExistMatcher.exists;\n+import static ru.yandex.qatools.htmlelements.matchers.common.HasTextMatcher.hasText;\n \n /**\n- * Created by kurau.\n+ * @author kurau\n+ * @author gladnik (Nikolai Gladkov)\n  */\n public class DefaultSteps {\n \n-    public static final String MAIN_PAGE = \"http://weather.lanwen.ru/#?cities=%s\";\n+    private static final String MAIN_PAGE = \"http://weather.lanwen.ru/#?cities=%s\";\n+    private static final String BLANK_PAGE = \"about:blank\";\n \n     private WebDriver driver;\n \n     public DefaultSteps(WebDriver driver) {\n         this.driver = driver;\n     }\n \n+    @Step(\"Открываем пустую страницу\")\n+    public void openBlankPage() {\n+        driver.get(BLANK_PAGE);\n+    }\n+\n     @Step(\"Открываем главную страницу для города «{0}»\")\n     public void openMainPageWithCity(String city) {\n         driver.get(format(MAIN_PAGE, city));\n     }\n \n-    @Step(\"Должны видеть на странице «{0}»\")\n-    public void shouldSee(WebElement element) {\n-        assertThat(\"Должны видеть элемент\", element, isDisplayed());\n+    @Step(\"Должны видеть элемент «{0}»\")\n+    public void shouldSee(HtmlElement element) {\n+        assertThat(\"Должны видеть элемент\", element, both(exists()).and(isDisplayed()));\n+    }\n+\n+    @Step(\"Должны видеть каждый из «{0}»\")\n+    public void shouldSee(List<? extends WebElement> elements) {\n+        assertThat(\"Должны видеть элементы\", new ArrayList<>(elements), everyItem(both(exists()).and(isDisplayed())));","path":"steps-module/src/main/java/ru/qatools/school/steps/websteps/DefaultSteps.java","position":60,"original_position":60,"commit_id":"fc2a405e285b47898c0192b3943e6a86b84ed6ae","original_commit_id":"fc2a405e285b47898c0192b3943e6a86b84ed6ae","user":{"login":"kurau","id":3195632,"avatar_url":"https://avatars.githubusercontent.com/u/3195632?v=3","gravatar_id":"","url":"https://api.github.com/users/kurau","html_url":"https://github.com/kurau","followers_url":"https://api.github.com/users/kurau/followers","following_url":"https://api.github.com/users/kurau/following{/other_user}","gists_url":"https://api.github.com/users/kurau/gists{/gist_id}","starred_url":"https://api.github.com/users/kurau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurau/subscriptions","organizations_url":"https://api.github.com/users/kurau/orgs","repos_url":"https://api.github.com/users/kurau/repos","events_url":"https://api.github.com/users/kurau/events{/privacy}","received_events_url":"https://api.github.com/users/kurau/received_events","type":"User","site_admin":false},"body":"А попробуй `everyItem(allOf(exists(), isDisplayed()))` и замени `new ArrayList<>(elements)` на просто `elements`?","created_at":"2016-04-24T22:19:59Z","updated_at":"2016-04-24T22:19:59Z","html_url":"https://github.com/autoschool/practice2016/pull/34#discussion_r60853025","pull_request_url":"https://api.github.com/repos/autoschool/practice2016/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/comments/60853025"},"html":{"href":"https://github.com/autoschool/practice2016/pull/34#discussion_r60853025"},"pull_request":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/autoschool/practice2016/pulls/34","id":66578958,"html_url":"https://github.com/autoschool/practice2016/pull/34","diff_url":"https://github.com/autoschool/practice2016/pull/34.diff","patch_url":"https://github.com/autoschool/practice2016/pull/34.patch","issue_url":"https://api.github.com/repos/autoschool/practice2016/issues/34","number":34,"state":"open","locked":false,"title":"Web tests branch","user":{"login":"gladnik","id":4618520,"avatar_url":"https://avatars.githubusercontent.com/u/4618520?v=3","gravatar_id":"","url":"https://api.github.com/users/gladnik","html_url":"https://github.com/gladnik","followers_url":"https://api.github.com/users/gladnik/followers","following_url":"https://api.github.com/users/gladnik/following{/other_user}","gists_url":"https://api.github.com/users/gladnik/gists{/gist_id}","starred_url":"https://api.github.com/users/gladnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladnik/subscriptions","organizations_url":"https://api.github.com/users/gladnik/orgs","repos_url":"https://api.github.com/users/gladnik/repos","events_url":"https://api.github.com/users/gladnik/events{/privacy}","received_events_url":"https://api.github.com/users/gladnik/received_events","type":"User","site_admin":false},"body":"Implemented step-wise tests for both required scenarios.","created_at":"2016-04-15T01:34:38Z","updated_at":"2016-04-24T22:19:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a765599ba51dc5b89f74be8eea4952cabc5836f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/autoschool/practice2016/pulls/34/commits","review_comments_url":"https://api.github.com/repos/autoschool/practice2016/pulls/34/comments","review_comment_url":"https://api.github.com/repos/autoschool/practice2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autoschool/practice2016/issues/34/comments","statuses_url":"https://api.github.com/repos/autoschool/practice2016/statuses/fc2a405e285b47898c0192b3943e6a86b84ed6ae","head":{"label":"gladnik:web-tests-branch","ref":"web-tests-branch","sha":"fc2a405e285b47898c0192b3943e6a86b84ed6ae","user":{"login":"gladnik","id":4618520,"avatar_url":"https://avatars.githubusercontent.com/u/4618520?v=3","gravatar_id":"","url":"https://api.github.com/users/gladnik","html_url":"https://github.com/gladnik","followers_url":"https://api.github.com/users/gladnik/followers","following_url":"https://api.github.com/users/gladnik/following{/other_user}","gists_url":"https://api.github.com/users/gladnik/gists{/gist_id}","starred_url":"https://api.github.com/users/gladnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladnik/subscriptions","organizations_url":"https://api.github.com/users/gladnik/orgs","repos_url":"https://api.github.com/users/gladnik/repos","events_url":"https://api.github.com/users/gladnik/events{/privacy}","received_events_url":"https://api.github.com/users/gladnik/received_events","type":"User","site_admin":false},"repo":{"id":55712558,"name":"practice2016","full_name":"gladnik/practice2016","owner":{"login":"gladnik","id":4618520,"avatar_url":"https://avatars.githubusercontent.com/u/4618520?v=3","gravatar_id":"","url":"https://api.github.com/users/gladnik","html_url":"https://github.com/gladnik","followers_url":"https://api.github.com/users/gladnik/followers","following_url":"https://api.github.com/users/gladnik/following{/other_user}","gists_url":"https://api.github.com/users/gladnik/gists{/gist_id}","starred_url":"https://api.github.com/users/gladnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladnik/subscriptions","organizations_url":"https://api.github.com/users/gladnik/orgs","repos_url":"https://api.github.com/users/gladnik/repos","events_url":"https://api.github.com/users/gladnik/events{/privacy}","received_events_url":"https://api.github.com/users/gladnik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gladnik/practice2016","description":"Practical part of lessons","fork":true,"url":"https://api.github.com/repos/gladnik/practice2016","forks_url":"https://api.github.com/repos/gladnik/practice2016/forks","keys_url":"https://api.github.com/repos/gladnik/practice2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gladnik/practice2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gladnik/practice2016/teams","hooks_url":"https://api.github.com/repos/gladnik/practice2016/hooks","issue_events_url":"https://api.github.com/repos/gladnik/practice2016/issues/events{/number}","events_url":"https://api.github.com/repos/gladnik/practice2016/events","assignees_url":"https://api.github.com/repos/gladnik/practice2016/assignees{/user}","branches_url":"https://api.github.com/repos/gladnik/practice2016/branches{/branch}","tags_url":"https://api.github.com/repos/gladnik/practice2016/tags","blobs_url":"https://api.github.com/repos/gladnik/practice2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gladnik/practice2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gladnik/practice2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/gladnik/practice2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gladnik/practice2016/statuses/{sha}","languages_url":"https://api.github.com/repos/gladnik/practice2016/languages","stargazers_url":"https://api.github.com/repos/gladnik/practice2016/stargazers","contributors_url":"https://api.github.com/repos/gladnik/practice2016/contributors","subscribers_url":"https://api.github.com/repos/gladnik/practice2016/subscribers","subscription_url":"https://api.github.com/repos/gladnik/practice2016/subscription","commits_url":"https://api.github.com/repos/gladnik/practice2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/gladnik/practice2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/gladnik/practice2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/gladnik/practice2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/gladnik/practice2016/contents/{+path}","compare_url":"https://api.github.com/repos/gladnik/practice2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gladnik/practice2016/merges","archive_url":"https://api.github.com/repos/gladnik/practice2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gladnik/practice2016/downloads","issues_url":"https://api.github.com/repos/gladnik/practice2016/issues{/number}","pulls_url":"https://api.github.com/repos/gladnik/practice2016/pulls{/number}","milestones_url":"https://api.github.com/repos/gladnik/practice2016/milestones{/number}","notifications_url":"https://api.github.com/repos/gladnik/practice2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gladnik/practice2016/labels{/name}","releases_url":"https://api.github.com/repos/gladnik/practice2016/releases{/id}","deployments_url":"https://api.github.com/repos/gladnik/practice2016/deployments","created_at":"2016-04-07T17:02:08Z","updated_at":"2016-04-07T17:02:08Z","pushed_at":"2016-04-20T13:08:00Z","git_url":"git://github.com/gladnik/practice2016.git","ssh_url":"git@github.com:gladnik/practice2016.git","clone_url":"https://github.com/gladnik/practice2016.git","svn_url":"https://github.com/gladnik/practice2016","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"autoschool:master","ref":"master","sha":"f25538516332a8c0d609eda202f755d16d4861ac","user":{"login":"autoschool","id":9036536,"avatar_url":"https://avatars.githubusercontent.com/u/9036536?v=3","gravatar_id":"","url":"https://api.github.com/users/autoschool","html_url":"https://github.com/autoschool","followers_url":"https://api.github.com/users/autoschool/followers","following_url":"https://api.github.com/users/autoschool/following{/other_user}","gists_url":"https://api.github.com/users/autoschool/gists{/gist_id}","starred_url":"https://api.github.com/users/autoschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autoschool/subscriptions","organizations_url":"https://api.github.com/users/autoschool/orgs","repos_url":"https://api.github.com/users/autoschool/repos","events_url":"https://api.github.com/users/autoschool/events{/privacy}","received_events_url":"https://api.github.com/users/autoschool/received_events","type":"Organization","site_admin":false},"repo":{"id":55640208,"name":"practice2016","full_name":"autoschool/practice2016","owner":{"login":"autoschool","id":9036536,"avatar_url":"https://avatars.githubusercontent.com/u/9036536?v=3","gravatar_id":"","url":"https://api.github.com/users/autoschool","html_url":"https://github.com/autoschool","followers_url":"https://api.github.com/users/autoschool/followers","following_url":"https://api.github.com/users/autoschool/following{/other_user}","gists_url":"https://api.github.com/users/autoschool/gists{/gist_id}","starred_url":"https://api.github.com/users/autoschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autoschool/subscriptions","organizations_url":"https://api.github.com/users/autoschool/orgs","repos_url":"https://api.github.com/users/autoschool/repos","events_url":"https://api.github.com/users/autoschool/events{/privacy}","received_events_url":"https://api.github.com/users/autoschool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autoschool/practice2016","description":"Practical part of lessons","fork":false,"url":"https://api.github.com/repos/autoschool/practice2016","forks_url":"https://api.github.com/repos/autoschool/practice2016/forks","keys_url":"https://api.github.com/repos/autoschool/practice2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autoschool/practice2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autoschool/practice2016/teams","hooks_url":"https://api.github.com/repos/autoschool/practice2016/hooks","issue_events_url":"https://api.github.com/repos/autoschool/practice2016/issues/events{/number}","events_url":"https://api.github.com/repos/autoschool/practice2016/events","assignees_url":"https://api.github.com/repos/autoschool/practice2016/assignees{/user}","branches_url":"https://api.github.com/repos/autoschool/practice2016/branches{/branch}","tags_url":"https://api.github.com/repos/autoschool/practice2016/tags","blobs_url":"https://api.github.com/repos/autoschool/practice2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autoschool/practice2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autoschool/practice2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/autoschool/practice2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autoschool/practice2016/statuses/{sha}","languages_url":"https://api.github.com/repos/autoschool/practice2016/languages","stargazers_url":"https://api.github.com/repos/autoschool/practice2016/stargazers","contributors_url":"https://api.github.com/repos/autoschool/practice2016/contributors","subscribers_url":"https://api.github.com/repos/autoschool/practice2016/subscribers","subscription_url":"https://api.github.com/repos/autoschool/practice2016/subscription","commits_url":"https://api.github.com/repos/autoschool/practice2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/autoschool/practice2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/autoschool/practice2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/autoschool/practice2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/autoschool/practice2016/contents/{+path}","compare_url":"https://api.github.com/repos/autoschool/practice2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autoschool/practice2016/merges","archive_url":"https://api.github.com/repos/autoschool/practice2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autoschool/practice2016/downloads","issues_url":"https://api.github.com/repos/autoschool/practice2016/issues{/number}","pulls_url":"https://api.github.com/repos/autoschool/practice2016/pulls{/number}","milestones_url":"https://api.github.com/repos/autoschool/practice2016/milestones{/number}","notifications_url":"https://api.github.com/repos/autoschool/practice2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autoschool/practice2016/labels{/name}","releases_url":"https://api.github.com/repos/autoschool/practice2016/releases{/id}","deployments_url":"https://api.github.com/repos/autoschool/practice2016/deployments","created_at":"2016-04-06T21:00:54Z","updated_at":"2016-04-15T04:23:45Z","pushed_at":"2016-04-24T20:46:44Z","git_url":"git://github.com/autoschool/practice2016.git","ssh_url":"git@github.com:autoschool/practice2016.git","clone_url":"https://github.com/autoschool/practice2016.git","svn_url":"https://github.com/autoschool/practice2016","homepage":null,"size":489,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":22,"forks":30,"open_issues":22,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/34"},"html":{"href":"https://github.com/autoschool/practice2016/pull/34"},"issue":{"href":"https://api.github.com/repos/autoschool/practice2016/issues/34"},"comments":{"href":"https://api.github.com/repos/autoschool/practice2016/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/autoschool/practice2016/statuses/fc2a405e285b47898c0192b3943e6a86b84ed6ae"}}}}