def create_tender(self): self.driver.find_element_by_css_selector(input_title).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.find_element_by_css_selector(input_description).send_keys( 'LOAD_TEST_Below_Threshold') enquiry_start = service.time_service()[0] self.driver.find_element_by_css_selector( input_start_enquiry).send_keys(enquiry_start) enquiry_end = service.time_service()[1] self.driver.find_element_by_css_selector(input_end_enquiry).send_keys( enquiry_end) tender_start = service.time_service()[2] self.driver.find_element_by_css_selector(input_start_tender).send_keys( tender_start) tender_end = service.time_service()[3] self.driver.find_element_by_css_selector(input_end_tender).send_keys( tender_end) self.driver.find_element_by_css_selector(save_draft).click() wait_until_visible(self.driver, add_lot, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(add_lot).click() wait_until_visible(self.driver, input_lot_title, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(input_lot_title).send_keys( 'LOAD_TEST_Below_Threshold LOT') self.driver.find_element_by_css_selector( input_lot_description).send_keys('LOAD_TEST_Below_Threshold LOT') self.driver.execute_script( """$('#Value_Amount').data("kendoNumericTextBox").value('3000.00');""" ) self.driver.execute_script( """$('#MinimalStep_Amount').data("kendoNumericTextBox").value('30.00');""" ) self.driver.find_element_by_css_selector(save_draft2).click() self.driver.execute_script('location.href = "{}";'.format(add_item)) wait_until_visible(self.driver, add_item, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(add_item).click() self.driver.execute_script( 'location.href = "{}";'.format(input_item_description)) self.driver.find_element_by_css_selector( input_item_description).send_keys('LOAD_TEST_Below_Threshold ITEM') self.driver.find_element_by_css_selector(select_cpv).click() wait_before_click(self.driver, select_cpv_1item, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(select_cpv_1item).click() sleep(2) wait_before_click(self.driver, cpv_selected, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(select_cpv).click() wait_until_invisible(self.driver, select_cpv_1item, select_type=By.CSS_SELECTOR) self.driver.execute_script('location.href = "{}";'.format(select_unit)) self.driver.find_element_by_css_selector(select_unit).click() wait_until_visible(self.driver, select_unit1, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(select_unit1).click() self.driver.find_element_by_css_selector(input_quantity).send_keys(10) self.driver.execute_script( 'location.href = "{}";'.format(input_delivery_start_date)) delivery_start = service.time_service()[4] self.driver.find_element_by_css_selector( input_delivery_start_date).send_keys(delivery_start) delivery_end = service.time_service()[5] self.driver.find_element_by_css_selector( input_delivery_end_date).send_keys(delivery_end) self.driver.execute_script( 'location.href = "{}";'.format(input_delivery_address)) wait_until_visible(self.driver, input_dropdown_region, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector( input_dropdown_region).send_keys(u"Волинська область") self.driver.find_element_by_css_selector(input_postal_code).send_keys( 02010) self.driver.find_element_by_css_selector(input_locality).send_keys( u"Ковель") self.driver.find_element_by_css_selector( input_delivery_address).send_keys("Random Valid Address, 7741") self.driver.find_element_by_css_selector(save_draft3).click() self.driver.execute_script( 'location.href = "{}";'.format(add_doc_button)) self.driver.find_element_by_css_selector(add_doc_button).click() # self.driver.find_element_by_css_selector(doc_title).click() self.driver.find_element_by_css_selector(doc_title).send_keys( "Tender Doc") file_to_upload = service.relative2absolute('./doc1.docx') self.driver.find_element_by_css_selector(doc_input).send_keys( file_to_upload) self.driver.find_element_by_css_selector(save_draft4).click() self.driver.execute_script( 'location.href = "{}";'.format(submit_create_tender)) wait_until_visible(self.driver, submit_create_tender, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(submit_create_tender).click()
def create_tender(self): self.driver.execute_script("window.scrollTo(0, 730);") sleep(1) wait_before_click(self.driver, input_value_amount, select_type=By.CSS_SELECTOR) sleep(4) self.driver.find_element_by_css_selector(input_value_amount).send_keys( 10000) self.driver.find_element_by_css_selector(input_min_step).send_keys(100) self.driver.execute_script("window.scrollTo(0, 1601);") self.driver.find_element_by_css_selector(input_title).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.find_element_by_css_selector(input_description).send_keys( 'LOAD_TEST_Below_Threshold') file_to_upload = service.relative2absolute('./doc1.docx') self.driver.find_element_by_xpath(add_doc).send_keys(file_to_upload) wait_until_visible(self.driver, input_item_description, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector( input_item_description).send_keys('LOAD_TEST_Below_Threshold') self.driver.find_element_by_css_selector(input_quantity).send_keys(10) self.driver.execute_script("window.scrollTo(0, 2214);") self.driver.find_element_by_css_selector(select_cpv).click() wait_until_visible(self.driver, select_cpv_1item, select_type=By.XPATH) self.driver.find_element_by_xpath(select_cpv_1item).click() wait_for_presence(self.driver, confirm_cpv, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(confirm_cpv).click() self.driver.execute_script("window.scrollTo(0, 2926);") wait_until_visible(self.driver, select_country, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(select_country).click() wait_until_visible(self.driver, select_dropdown_region, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector( select_dropdown_region).click() self.driver.find_element_by_css_selector(input_locality).send_keys( u"Ковель") self.driver.find_element_by_css_selector( input_delivery_address).send_keys("Random Valid Address, 7741") self.driver.find_element_by_css_selector(input_postal_code).send_keys( '02010') self.driver.execute_script("window.scrollTo(0, 3509);") self.driver.find_element_by_css_selector( input_delivery_start_date).click() self.driver.find_element_by_css_selector( input_delivery_start_date).clear() delivery_start = service.time_service()[3] wait_until_visible(self.driver, input_delivery_start_date, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector( input_delivery_start_date).send_keys(delivery_start) self.driver.find_element_by_css_selector( input_delivery_end_date).click() self.driver.find_element_by_css_selector( input_delivery_end_date).clear() delivery_end = service.time_service()[4] self.driver.find_element_by_css_selector( input_delivery_end_date).send_keys(delivery_end) self.driver.execute_script("window.scrollTo(0, 3999);") self.driver.find_element_by_css_selector(input_end_enquiry).click() self.driver.find_element_by_css_selector(input_end_enquiry).clear() enquiry_end = service.time_service()[0] self.driver.find_element_by_css_selector(input_end_enquiry).send_keys( enquiry_end) self.driver.find_element_by_css_selector(input_start_tender).click() self.driver.find_element_by_css_selector(input_start_tender).clear() tender_start = service.time_service()[1] self.driver.find_element_by_css_selector(input_start_tender).send_keys( tender_start) self.driver.find_element_by_css_selector(input_end_tender).click() self.driver.find_element_by_css_selector(input_end_tender).clear() tender_end = service.time_service()[2] self.driver.find_element_by_css_selector(input_end_tender).send_keys( tender_end) self.driver.find_element_by_css_selector( input_procuring_entity).click() self.driver.execute_script("window.scrollTo(0, 4641);") wait_until_visible(self.driver, submit_create_tender, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(submit_create_tender).click()
def create_tender(self): self.driver.get(create_tender_url) wait_until_visible(self.driver, input_title, select_type=By.CSS_SELECTOR) self.driver.find_element_by_css_selector(input_title).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.find_element_by_css_selector(input_description).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.execute_script("window.scrollTo(0, 442);") self.driver.execute_script(input_start_enquiry) self.driver.execute_script(input_end_enquiry) self.driver.execute_script(input_start_tender) self.driver.execute_script(input_end_tender) self.driver.find_element_by_css_selector(acceleration_on).click() self.driver.find_element_by_css_selector(step1_button).click() self.driver.execute_script("window.scrollTo(0, 161);") wait_until_visible(self.driver, input_lot_title, select_type=By.XPATH) self.driver.find_element_by_xpath(input_lot_title).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.find_element_by_xpath(input_lot_description).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.find_element_by_xpath(input_value_amount).send_keys(3000) self.driver.find_element_by_xpath(input_min_step).send_keys(30) self.driver.execute_script("window.scrollTo(0, 720);") wait_until_visible(self.driver, input_item_description, select_type=By.XPATH) self.driver.find_element_by_xpath(input_item_description).send_keys( 'LOAD_TEST_Below_Threshold') self.driver.find_element_by_xpath(input_quantity).send_keys(10) self.driver.find_element_by_xpath(select_cpv).click() wait_until_visible(self.driver, select_cpv_1item, select_type=By.XPATH) self.driver.find_element_by_xpath(select_cpv_1item).click() wait_for_presence(self.driver, confirm_cpv, select_type=By.XPATH) self.driver.find_element_by_xpath(confirm_cpv).click() sleep(3) self.driver.find_element_by_xpath(click_delivery_checkbox).click() self.driver.execute_script("window.scrollTo(0, 986);") self.driver.find_element_by_xpath(click_dropdown_region).click() wait_until_visible(self.driver, select_region, select_type=By.XPATH) self.driver.find_element_by_xpath(input_postal_code).send_keys('02010') self.driver.find_element_by_xpath(input_locality).send_keys(u"Київ") self.driver.find_element_by_xpath(input_delivery_address).send_keys( "Random Valid Address, 7741") self.driver.find_element_by_xpath(input_delivery_start_date).click() self.driver.find_element_by_xpath(input_delivery_start_date).clear() delivery_start = service.time_service()[4] wait_until_visible(self.driver, input_delivery_start_date, select_type=By.XPATH) self.driver.find_element_by_xpath(input_delivery_start_date).send_keys( delivery_start) self.driver.find_element_by_xpath(input_delivery_end_date).click() self.driver.find_element_by_xpath(input_delivery_end_date).clear() delivery_end = service.time_service()[5] wait_until_visible(self.driver, input_delivery_start_date, select_type=By.XPATH) self.driver.find_element_by_xpath(input_delivery_end_date).send_keys( delivery_end) self.driver.execute_script("window.scrollTo(0, 160);") wait_until_visible(self.driver, step2_button, select_type=By.XPATH) self.driver.find_element_by_xpath(step2_button).click() wait_until_visible(self.driver, step3_button, select_type=By.XPATH) self.driver.find_element_by_xpath(step3_button).click() file_to_upload = service.relative2absolute('./doc1.docx') sleep(1) self.driver.find_element_by_xpath(add_doc).click() sleep(2) wait_for_presence(self.driver, upload_document, select_type=By.XPATH) self.driver.find_element_by_xpath(upload_document).send_keys( file_to_upload) self.driver.find_element_by_xpath(select_doc_type).click() self.driver.find_element_by_xpath(select_doc_type_1).click() wait_until_visible(self.driver, upload_verif, select_type=By.XPATH) self.driver.find_element_by_css_selector(submit_create_tender).click() wait_until_visible(self.driver, close_popup_window, select_type=By.XPATH) self.driver.find_element_by_xpath(close_popup_window).click()