{"action":"created","comment":{"url":"https://api.github.com/repos/dkotegov/homework-4/pulls/comments/195659641","pull_request_review_id":129073095,"id":195659641,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTY1OTY0MQ==","diff_hunk":"@@ -0,0 +1,81 @@\n+# -*- coding: utf-8 -*-\n+import os\n+import re\n+\n+from selenium.common.exceptions import TimeoutException\n+from selenium.webdriver.common.by import By\n+from selenium.webdriver.support import expected_conditions as ec\n+from selenium.webdriver.support.ui import WebDriverWait\n+\n+\n+class Component(object):\n+    TIMEOUT = 30\n+    FREQUENCY = 0.1\n+\n+    NUMBER_OF_FIRST_CHARS = 83\n+\n+    @staticmethod\n+    def get_number_from_string(string):\n+        return int(re.search(r'\\d+', string).group())\n+\n+    @staticmethod\n+    def get_first_part_of_image_src(src):\n+        return src[:Component.NUMBER_OF_FIRST_CHARS]\n+\n+    def __init__(self, driver):\n+        self.driver = driver\n+\n+    def find_element(self, xpath):\n+        return WebDriverWait(self.driver, self.TIMEOUT, self.FREQUENCY).until(\n+            lambda d: d.find_element_by_xpath(xpath)\n+        )\n+\n+    def find_elements(self, xpath):\n+        return WebDriverWait(self.driver, self.TIMEOUT, self.FREQUENCY).until(\n+            lambda d: d.find_elements_by_xpath(xpath)\n+        )\n+\n+    def get_number_of_elements(self, xpath):\n+        return len(self.find_elements(xpath))\n+\n+    def is_exist_element(self, xpath):\n+        try:\n+            self.find_element(xpath)\n+        except TimeoutException:\n+            return False\n+        return True\n+\n+    def is_not_exist_element(self, xpath):","path":"Components/component.py","position":48,"original_position":48,"commit_id":"5ccbcc5e4a66e473d629d3380dd668866d925e03","original_commit_id":"5ccbcc5e4a66e473d629d3380dd668866d925e03","user":{"login":"kgulyy","id":8623696,"node_id":"MDQ6VXNlcjg2MjM2OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8623696?v=4","gravatar_id":"","url":"https://api.github.com/users/kgulyy","html_url":"https://github.com/kgulyy","followers_url":"https://api.github.com/users/kgulyy/followers","following_url":"https://api.github.com/users/kgulyy/following{/other_user}","gists_url":"https://api.github.com/users/kgulyy/gists{/gist_id}","starred_url":"https://api.github.com/users/kgulyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgulyy/subscriptions","organizations_url":"https://api.github.com/users/kgulyy/orgs","repos_url":"https://api.github.com/users/kgulyy/repos","events_url":"https://api.github.com/users/kgulyy/events{/privacy}","received_events_url":"https://api.github.com/users/kgulyy/received_events","type":"User","site_admin":false},"body":"Есть","created_at":"2018-06-15T08:06:17Z","updated_at":"2018-06-15T08:06:18Z","html_url":"https://github.com/dkotegov/homework-4/pull/54#discussion_r195659641","pull_request_url":"https://api.github.com/repos/dkotegov/homework-4/pulls/54","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dkotegov/homework-4/pulls/comments/195659641"},"html":{"href":"https://github.com/dkotegov/homework-4/pull/54#discussion_r195659641"},"pull_request":{"href":"https://api.github.com/repos/dkotegov/homework-4/pulls/54"}},"in_reply_to_id":195597016},"pull_request":{"url":"https://api.github.com/repos/dkotegov/homework-4/pulls/54","id":194575680,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTc1Njgw","html_url":"https://github.com/dkotegov/homework-4/pull/54","diff_url":"https://github.com/dkotegov/homework-4/pull/54.diff","patch_url":"https://github.com/dkotegov/homework-4/pull/54.patch","issue_url":"https://api.github.com/repos/dkotegov/homework-4/issues/54","number":54,"state":"open","locked":false,"title":"Группы - Магазин","user":{"login":"kgulyy","id":8623696,"node_id":"MDQ6VXNlcjg2MjM2OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8623696?v=4","gravatar_id":"","url":"https://api.github.com/users/kgulyy","html_url":"https://github.com/kgulyy","followers_url":"https://api.github.com/users/kgulyy/followers","following_url":"https://api.github.com/users/kgulyy/following{/other_user}","gists_url":"https://api.github.com/users/kgulyy/gists{/gist_id}","starred_url":"https://api.github.com/users/kgulyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgulyy/subscriptions","organizations_url":"https://api.github.com/users/kgulyy/orgs","repos_url":"https://api.github.com/users/kgulyy/repos","events_url":"https://api.github.com/users/kgulyy/events{/privacy}","received_events_url":"https://api.github.com/users/kgulyy/received_events","type":"User","site_admin":false},"body":"### Команда \r\n- Константин Гулый\r\n- Ольга Сурикова\r\n\r\n### Чек-лист №1 (Константин Гулый)\r\n#### Каталог товаров\r\n- [x] Создать каталог товаров из 3 мест (панель каталогов, заглушка каталогов, панель товаров)\r\n- [x] Отложить создание каталога\r\n- [x] Редактировать каталог товаров\r\n- [x] Удалить каталог товаров\r\n- [x] Разместить товар в каталоге\r\n- [x] Удалить товар из каталога\r\n- [x] Указать, что товара нет в наличии / Вернуть товар в продажу\r\n- [x] Закрепить / Открепить товар\r\n\r\n### Чек-лист №2 (Ольга Сурикова)\r\n#### Ключевые слова для топика Магазина\r\n- [x] Добавить / Удалить ключевое слово\r\n- [x] Добавить / Удалить несколько ключевых слов\r\n- [x] Изменить ключевое слово\r\n- [x] Изменить несколько ключевых слов","created_at":"2018-06-13T12:51:48Z","updated_at":"2018-06-15T08:06:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d95355338e99f2588b42676aef6846850c6a37c2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dkotegov/homework-4/pulls/54/commits","review_comments_url":"https://api.github.com/repos/dkotegov/homework-4/pulls/54/comments","review_comment_url":"https://api.github.com/repos/dkotegov/homework-4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dkotegov/homework-4/issues/54/comments","statuses_url":"https://api.github.com/repos/dkotegov/homework-4/statuses/5ccbcc5e4a66e473d629d3380dd668866d925e03","head":{"label":"kgulyy:master","ref":"master","sha":"5ccbcc5e4a66e473d629d3380dd668866d925e03","user":{"login":"kgulyy","id":8623696,"node_id":"MDQ6VXNlcjg2MjM2OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8623696?v=4","gravatar_id":"","url":"https://api.github.com/users/kgulyy","html_url":"https://github.com/kgulyy","followers_url":"https://api.github.com/users/kgulyy/followers","following_url":"https://api.github.com/users/kgulyy/following{/other_user}","gists_url":"https://api.github.com/users/kgulyy/gists{/gist_id}","starred_url":"https://api.github.com/users/kgulyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgulyy/subscriptions","organizations_url":"https://api.github.com/users/kgulyy/orgs","repos_url":"https://api.github.com/users/kgulyy/repos","events_url":"https://api.github.com/users/kgulyy/events{/privacy}","received_events_url":"https://api.github.com/users/kgulyy/received_events","type":"User","site_admin":false},"repo":{"id":131305150,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEzMDUxNTA=","name":"homework-4","full_name":"kgulyy/homework-4","owner":{"login":"kgulyy","id":8623696,"node_id":"MDQ6VXNlcjg2MjM2OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/8623696?v=4","gravatar_id":"","url":"https://api.github.com/users/kgulyy","html_url":"https://github.com/kgulyy","followers_url":"https://api.github.com/users/kgulyy/followers","following_url":"https://api.github.com/users/kgulyy/following{/other_user}","gists_url":"https://api.github.com/users/kgulyy/gists{/gist_id}","starred_url":"https://api.github.com/users/kgulyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgulyy/subscriptions","organizations_url":"https://api.github.com/users/kgulyy/orgs","repos_url":"https://api.github.com/users/kgulyy/repos","events_url":"https://api.github.com/users/kgulyy/events{/privacy}","received_events_url":"https://api.github.com/users/kgulyy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kgulyy/homework-4","description":"Функциональные UI-автотесты по чек-листам проекта Одноклассники","fork":true,"url":"https://api.github.com/repos/kgulyy/homework-4","forks_url":"https://api.github.com/repos/kgulyy/homework-4/forks","keys_url":"https://api.github.com/repos/kgulyy/homework-4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kgulyy/homework-4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kgulyy/homework-4/teams","hooks_url":"https://api.github.com/repos/kgulyy/homework-4/hooks","issue_events_url":"https://api.github.com/repos/kgulyy/homework-4/issues/events{/number}","events_url":"https://api.github.com/repos/kgulyy/homework-4/events","assignees_url":"https://api.github.com/repos/kgulyy/homework-4/assignees{/user}","branches_url":"https://api.github.com/repos/kgulyy/homework-4/branches{/branch}","tags_url":"https://api.github.com/repos/kgulyy/homework-4/tags","blobs_url":"https://api.github.com/repos/kgulyy/homework-4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kgulyy/homework-4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kgulyy/homework-4/git/refs{/sha}","trees_url":"https://api.github.com/repos/kgulyy/homework-4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kgulyy/homework-4/statuses/{sha}","languages_url":"https://api.github.com/repos/kgulyy/homework-4/languages","stargazers_url":"https://api.github.com/repos/kgulyy/homework-4/stargazers","contributors_url":"https://api.github.com/repos/kgulyy/homework-4/contributors","subscribers_url":"https://api.github.com/repos/kgulyy/homework-4/subscribers","subscription_url":"https://api.github.com/repos/kgulyy/homework-4/subscription","commits_url":"https://api.github.com/repos/kgulyy/homework-4/commits{/sha}","git_commits_url":"https://api.github.com/repos/kgulyy/homework-4/git/commits{/sha}","comments_url":"https://api.github.com/repos/kgulyy/homework-4/comments{/number}","issue_comment_url":"https://api.github.com/repos/kgulyy/homework-4/issues/comments{/number}","contents_url":"https://api.github.com/repos/kgulyy/homework-4/contents/{+path}","compare_url":"https://api.github.com/repos/kgulyy/homework-4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kgulyy/homework-4/merges","archive_url":"https://api.github.com/repos/kgulyy/homework-4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kgulyy/homework-4/downloads","issues_url":"https://api.github.com/repos/kgulyy/homework-4/issues{/number}","pulls_url":"https://api.github.com/repos/kgulyy/homework-4/pulls{/number}","milestones_url":"https://api.github.com/repos/kgulyy/homework-4/milestones{/number}","notifications_url":"https://api.github.com/repos/kgulyy/homework-4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kgulyy/homework-4/labels{/name}","releases_url":"https://api.github.com/repos/kgulyy/homework-4/releases{/id}","deployments_url":"https://api.github.com/repos/kgulyy/homework-4/deployments","created_at":"2018-04-27T14:12:30Z","updated_at":"2018-06-14T08:11:20Z","pushed_at":"2018-06-14T08:11:19Z","git_url":"git://github.com/kgulyy/homework-4.git","ssh_url":"git@github.com:kgulyy/homework-4.git","clone_url":"https://github.com/kgulyy/homework-4.git","svn_url":"https://github.com/kgulyy/homework-4","homepage":"https://ok.ru/","size":16881,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dkotegov:master","ref":"master","sha":"0a92890a50404914c83f614554363035c5498759","user":{"login":"dkotegov","id":11413412,"node_id":"MDQ6VXNlcjExNDEzNDEy","avatar_url":"https://avatars3.githubusercontent.com/u/11413412?v=4","gravatar_id":"","url":"https://api.github.com/users/dkotegov","html_url":"https://github.com/dkotegov","followers_url":"https://api.github.com/users/dkotegov/followers","following_url":"https://api.github.com/users/dkotegov/following{/other_user}","gists_url":"https://api.github.com/users/dkotegov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkotegov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkotegov/subscriptions","organizations_url":"https://api.github.com/users/dkotegov/orgs","repos_url":"https://api.github.com/users/dkotegov/repos","events_url":"https://api.github.com/users/dkotegov/events{/privacy}","received_events_url":"https://api.github.com/users/dkotegov/received_events","type":"User","site_admin":false},"repo":{"id":55363445,"node_id":"MDEwOlJlcG9zaXRvcnk1NTM2MzQ0NQ==","name":"homework-4","full_name":"dkotegov/homework-4","owner":{"login":"dkotegov","id":11413412,"node_id":"MDQ6VXNlcjExNDEzNDEy","avatar_url":"https://avatars3.githubusercontent.com/u/11413412?v=4","gravatar_id":"","url":"https://api.github.com/users/dkotegov","html_url":"https://github.com/dkotegov","followers_url":"https://api.github.com/users/dkotegov/followers","following_url":"https://api.github.com/users/dkotegov/following{/other_user}","gists_url":"https://api.github.com/users/dkotegov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkotegov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkotegov/subscriptions","organizations_url":"https://api.github.com/users/dkotegov/orgs","repos_url":"https://api.github.com/users/dkotegov/repos","events_url":"https://api.github.com/users/dkotegov/events{/privacy}","received_events_url":"https://api.github.com/users/dkotegov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkotegov/homework-4","description":null,"fork":false,"url":"https://api.github.com/repos/dkotegov/homework-4","forks_url":"https://api.github.com/repos/dkotegov/homework-4/forks","keys_url":"https://api.github.com/repos/dkotegov/homework-4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkotegov/homework-4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkotegov/homework-4/teams","hooks_url":"https://api.github.com/repos/dkotegov/homework-4/hooks","issue_events_url":"https://api.github.com/repos/dkotegov/homework-4/issues/events{/number}","events_url":"https://api.github.com/repos/dkotegov/homework-4/events","assignees_url":"https://api.github.com/repos/dkotegov/homework-4/assignees{/user}","branches_url":"https://api.github.com/repos/dkotegov/homework-4/branches{/branch}","tags_url":"https://api.github.com/repos/dkotegov/homework-4/tags","blobs_url":"https://api.github.com/repos/dkotegov/homework-4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkotegov/homework-4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkotegov/homework-4/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkotegov/homework-4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkotegov/homework-4/statuses/{sha}","languages_url":"https://api.github.com/repos/dkotegov/homework-4/languages","stargazers_url":"https://api.github.com/repos/dkotegov/homework-4/stargazers","contributors_url":"https://api.github.com/repos/dkotegov/homework-4/contributors","subscribers_url":"https://api.github.com/repos/dkotegov/homework-4/subscribers","subscription_url":"https://api.github.com/repos/dkotegov/homework-4/subscription","commits_url":"https://api.github.com/repos/dkotegov/homework-4/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkotegov/homework-4/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkotegov/homework-4/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkotegov/homework-4/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkotegov/homework-4/contents/{+path}","compare_url":"https://api.github.com/repos/dkotegov/homework-4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkotegov/homework-4/merges","archive_url":"https://api.github.com/repos/dkotegov/homework-4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkotegov/homework-4/downloads","issues_url":"https://api.github.com/repos/dkotegov/homework-4/issues{/number}","pulls_url":"https://api.github.com/repos/dkotegov/homework-4/pulls{/number}","milestones_url":"https://api.github.com/repos/dkotegov/homework-4/milestones{/number}","notifications_url":"https://api.github.com/repos/dkotegov/homework-4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkotegov/homework-4/labels{/name}","releases_url":"https://api.github.com/repos/dkotegov/homework-4/releases{/id}","deployments_url":"https://api.github.com/repos/dkotegov/homework-4/deployments","created_at":"2016-04-03T19:01:49Z","updated_at":"2016-04-03T19:03:52Z","pushed_at":"2018-06-14T08:11:20Z","git_url":"git://github.com/dkotegov/homework-4.git","ssh_url":"git@github.com:dkotegov/homework-4.git","clone_url":"https://github.com/dkotegov/homework-4.git","svn_url":"https://github.com/dkotegov/homework-4","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":59,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dkotegov/homework-4/pulls/54"},"html":{"href":"https://github.com/dkotegov/homework-4/pull/54"},"issue":{"href":"https://api.github.com/repos/dkotegov/homework-4/issues/54"},"comments":{"href":"https://api.github.com/repos/dkotegov/homework-4/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/dkotegov/homework-4/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/dkotegov/homework-4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dkotegov/homework-4/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/dkotegov/homework-4/statuses/5ccbcc5e4a66e473d629d3380dd668866d925e03"}},"author_association":"NONE"}}
{"actor":{"display_login":"kgulyy"}}