@@ -111,9 +111,20 @@ def get_direct_internal_links_auth_list(self):
111111 for i in [0 , 1 , 2 , 4 , 5 , 6 ]:
112112 direct_internal_links .append (direct_links [i ])
113113 att2 = [element .get_attribute ("href" ) for element in direct_internal_links ]
114- # print(*att2, len(att2), sep='\n')
114+ print (* att2 , len (att2 ), sep = '\n ' )
115115 return direct_internal_links
116116
117+ @allure .step ("""Get the list with the 'Telegram' link #1
118+ (direct external links) in the Header for an AUTHORIZED user -- ACTUAL""" )
119+ def get_direct_external_links_auth_list (self ):
120+ direct_links = self .get_direct_links_auth_list ()
121+ direct_external_links = []
122+ for i in [3 ]:
123+ direct_external_links .append (direct_links [i ])
124+ att3 = [element .get_attribute ("href" ) for element in direct_external_links ]
125+ print (* att3 , len (att3 ), sep = '\n ' )
126+ return direct_external_links
127+
117128 @allure .step ("""Get the list of links in the 'More' dropdown in the Header for an AUTHORIZED user""" )
118129 def get_dropdown_links_auth_list (self ):
119130 dropdown_auth_links = self .elements_are_present (self .locators1 .DROPDOWN_LINKS_AUTH )
@@ -141,24 +152,24 @@ def get_list_of_links_in_more1(self):
141152 return more_links
142153
143154 @allure .step ("""Get the list of links (internal and external) in the 'More' dropdown in the Header
144- for every user""" )
155+ for every user -- FOR REVIEW """ )
145156 def get_list_of_links_in_more (self ):
146157 return self .elements_are_present (self .locators .LINKS_IN_MORE )
147158
148159 @allure .step ("""Check the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
149- in the 'More' dropdown are invisible for every user""" )
160+ in the 'More' dropdown are invisible for every user -- FOR REVIEW """ )
150161 def check_links_invisibility_in_more (self ):
151162 return all (self .element_is_not_visible (element ) for element in self .get_list_of_links_in_more ())
152163
153164 @allure .step ("""Check the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
154- in the 'More' dropdown are visible for every user""" )
165+ in the 'More' dropdown are visible for every user -- FOR REVIEW """ )
155166 def check_links_visibility_in_more (self ):
156167 self .click_more_button ()
157168 return all (link .is_displayed () for link in self .get_list_of_links_in_more ())
158169
159170 # Lists of links
160171 @allure .step ("""Get the list of the 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links "
161- (internal links) in the 'More' dropdown for every user""" )
172+ (internal links) in the 'More' dropdown for every user -- FOR REVIEW """ )
162173 def get_list_of_internal_links_in_more (self ):
163174 links = self .get_list_of_links_in_more ()[2 :]
164175 print (links )
@@ -168,13 +179,13 @@ def get_list_of_internal_links_in_more(self):
168179 # return self.get_list_of_links_in_more()[2:]
169180
170181 @allure .step ("""Get the list of the 'Donate', 'GitHub' links (external links)
171- in the 'More' dropdown for every user""" )
182+ in the 'More' dropdown for every user -- FOR REVIEW """ )
172183 def get_list_of_external_links_in_more (self ):
173184 # return self.get_list_of_links_in_more()[4:6]
174185 return self .get_list_of_links_in_more ()[:3 ]
175186
176187 @allure .step ("""Get the list of the 'Donate', 'GitHub' links (external links)
177- in the 'More' dropdown for authorized user""" )
188+ in the 'More' dropdown for authorized user -- FOR REVIEW """ )
178189 def get_list_of_external_links_in_more_auth (self ):
179190 links = self .get_list_of_links_in_more ()[3 :6 ]
180191 att = [element .get_attribute ("href" ) for element in links ]
@@ -206,16 +217,6 @@ def get_list_of_direct_internal_links_unauth(self):
206217 direct_internal_links .append (links [i ])
207218 return direct_internal_links
208219
209- @allure .step ("""Get the list of the 'Statistics', 'Groups', 'About', 'Profile', 'Logo' links (direct internal links)
210- in the Header for an authorized user""" )
211- def get_list_of_direct_internal_links_auth (self ):
212- links = self .get_links_auth_list ()
213- direct_internal_links = []
214- for i in [2 , 1 , 3 , 11 , 0 ]:
215- direct_internal_links .append (links [i ])
216- # print([element.get_attribute("href") for element in direct_internal_links])
217- return direct_internal_links
218-
219220 @allure .step ("""Get the list of the 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links "
220221 (internal links) in the 'More' dropdown for an unauthorized user""" )
221222 def get_list_of_internal_links_in_more1 (self ):
@@ -401,7 +402,8 @@ def click_on_internal_links_in_header_unauth(self):
401402 def click_on_internal_links_in_header_auth1 (self ):
402403 opened_pages = []
403404 # Click on the 'Statistics', 'Groups', 'About', 'Profile', 'Logo' links
404- for link in self .get_list_of_direct_internal_links_auth ():
405+ # for link in self.get_list_of_direct_internal_links_auth():
406+ for link in self .get_direct_internal_links_auth_list ():
405407 current_url = self .get_current_tab_url ()
406408 link .click ()
407409 Wait (self .driver , 10 ).until (EC .url_changes (current_url ))
0 commit comments