@@ -8,12 +8,12 @@ class FileLoadTestSelenium(BasicSeleniumTest):
88
99 def upload_file (self , report_ext ):
1010 report = report_ext
11- form_for_load = self .get_driver ().find_element (By .CSS_SELECTOR , 'input[type=file] ' )
11+ form_for_load = self .get_driver ().find_element (By .ID , 'upload_file ' )
1212 form_for_load .send_keys (report )
13- load_button = self .get_driver ().find_element (By .XPATH , '//*[@id=" upload_upload_button"] ' )
13+ load_button = self .get_driver ().find_element (By .ID , 'upload_upload_button' )
1414 load_button .click ()
15- obj = WebDriverWait (self .driver , 10 ).until (EC .presence_of_element_located ((By .XPATH , '/html/body/div/div[2]/h4/i ' )))
16- if obj . text . startswith ( 'Производится проверка файла' ) :
15+ obj = WebDriverWait (self .driver , 10 ).until (EC .presence_of_element_located ((By .ID , 'results_title ' )))
16+ if 'Производится проверка файла' in obj . text :
1717 start_time = time .time ()
1818 max_time = 240
1919 while (time .time () - start_time ) < max_time :
@@ -36,7 +36,6 @@ def check_pack(self):
3636 URL = self .get_url ('/upload/' )
3737 self .get_driver ().get (URL )
3838 self .get_driver ().implicitly_wait (30 )
39- # obj = self.get_driver().find_element(By.XPATH, "/html/body/div/div[2]/div/p/b")
4039 obj = self .get_driver ().find_element (By .ID , "criteria_pack_name" )
4140 return obj .text
4241
0 commit comments