|
1 | 1 | """Methods for verifying web elements in the Header of the site""" |
2 | | -import time |
3 | 2 | import allure |
4 | 3 | import requests |
5 | 4 | from selenium.webdriver.support import expected_conditions as EC |
@@ -99,8 +98,10 @@ def get_list_of_direct_links_unauth(self): |
99 | 98 | def get_list_of_direct_links_auth(self): |
100 | 99 | links = self.get_list_of_links_auth() |
101 | 100 | direct_links = [] |
102 | | - for i in [1, 2, 3, 4, 11, 0]: |
| 101 | + # for i in [1, 2, 3, 4, 11, 0]: |
| 102 | + for i in [1, 2, 3, 4, 17, 0]: |
103 | 103 | direct_links.append(links[i]) |
| 104 | + # print(*direct_links) |
104 | 105 | return direct_links |
105 | 106 |
|
106 | 107 | @allure.step("Check the 'About', 'Telegram', 'Registration', 'Logo' links are visible for an unauthorized user") |
@@ -279,16 +280,22 @@ def check_user_name_visibility(self): |
279 | 280 | def get_text_in_direct_links_unauth(self): |
280 | 281 | return [link.text for link in self.get_list_of_direct_links_unauth()[:3]] |
281 | 282 |
|
282 | | - @allure.step("""Get text in the 'Groups', 'Statistics', 'About', 'Telegram', 'Profile' links in the Header |
| 283 | + @allure.step("""Get text in the 'Groups', 'Statistics', 'About', 'Telegram' links in the Header |
283 | 284 | for an authorized user""") |
284 | 285 | def get_text_in_direct_links_auth(self): |
285 | | - return [link.text for link in self.get_list_of_direct_links_auth()[:5]] |
| 286 | + direct_links_text = [link.text for link in self.get_list_of_direct_links_auth()[:4]] |
| 287 | + print(*direct_links_text, len(direct_links_text), sep='\n') |
| 288 | + return direct_links_text |
| 289 | + # return [link.text for link in self.get_list_of_direct_links_auth()[:5]] |
286 | 290 |
|
287 | 291 | @allure.step("""Get text in the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' |
288 | 292 | links in the Header""") |
289 | 293 | def get_text_of_links_in_more(self): |
290 | 294 | self.click_more_button() |
291 | | - return [link.text for link in self.get_list_of_links_in_more()] |
| 295 | + more_links_text = [link.text for link in self.get_list_of_links_in_more()] |
| 296 | + print(*more_links_text, len(more_links_text), sep='\n') |
| 297 | + return more_links_text |
| 298 | + # return [link.text for link in self.get_list_of_links_in_more()] |
292 | 299 |
|
293 | 300 | @allure.step("Get text in buttons in the Header for an unauthorized user") |
294 | 301 | def get_text_in_buttons_unauth(self): |
|
0 commit comments