def execute_main(self): v_start_time = time.time() self.lo.log_to_file("INFO", "Login in to DC4 Pre-Prod") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) input_sheet = self.v_input_wb.get_sheet_by_name('Input') #HardCoded Location current_row = 2 Company_Name = input_sheet.cell(row=current_row, column=1).value Retailer_Name=input_sheet.cell(row=current_row,column=2).value Capability_UID=input_sheet.cell(row=current_row,column=5).value #Login to DC4 Pre-Production lg.login("DC4 PreProd") #Entering & Searching DC4 Company dc4_common_dc4_utility_object = DC4_Utility(self.v_task_type, self.v_driver, self.lo) dc4_common_dc4_utility_object.company_search_by_name(Company_Name) #Clicking on Searched Company Name, Relationships Tab dc4_local_dc4_utility_local_object=DC4_Utility_Local(self.v_task_type, self.v_driver, self.lo, self.v_input_wb) dc4_local_dc4_utility_local_object.click_on_searched_company_name() dc4_local_dc4_utility_local_object.add_new_capability() dc4_local_dc4_utility_local_object.return_capability_uid() dc4_local_dc4_utility_local_object.click_on_preprod_relationships_tab() dc4_local_dc4_utility_local_object.search_trading_partner_name_in_relationships(Retailer_Name) dc4_local_dc4_utility_local_object.click_on_profile_name_via_relationships() dc4_local_dc4_utility_local_object.click_on_show_link_of_searched_profile() dc4_local_dc4_utility_local_object.add_existing_capability() time.sleep(10)
def execute_main(self): login_object = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.log_file_object) error_hospital_machine_learning_object = Error_Hospital_Machine_Learning(self.v_task_type, self.v_username) report_file_object = ReportFileUtility(self.v_task_type) output_sheet = self.v_input_wb.get_sheet_by_name('Output') input_sheet = self.v_input_wb.get_sheet_by_name('Input') excel_operation_object = ExcelOperations(self.v_task_type, input_sheet) #Login into DC4 Prod login_object.login("DC4 Prod") self.log_file_object.log_to_file("INFO", "Login in to DC4 Prod") self.v_driver.execute_script("window.open('https://commerce.spscommerce.com/transaction-tracker/prod/transactions/', 'new_window')") self.v_driver.switch_to.window(self.v_driver.window_handles[-1]) time.sleep(2) #Login into Launchpad login_object.login("Launchpad") self.log_file_object.log_to_file("INFO", "Login in to Launchpad") self.v_driver.switch_to.window(self.v_driver.window_handles[0]) time.sleep(2) #Extract data from input sheet for index in range(2,input_sheet.max_row+1): today = datetime.datetime.now() DD = datetime.timedelta(days=6) earlier = today - DD earlier_str = earlier.strftime("%Y-%m-%d") earlier_str = earlier_str+' 00:00:00' v_error_title = excel_operation_object.get_value(index, 1) #Searching data as per error title if v_error_title == LocalElementLocator.ADHOC_ERROR_TITLE: self.log_file_object.log_to_file("INFO", "Seaching tickets for error title:- AdhocReporting: document rejected") v_start_time = time.time() v_ticket_uid = excel_operation_object.get_value(index, 2) if v_ticket_uid is None: v_ticket_uid = ' ' Error_Document_rejected_obj = Error_Document_rejected(self.v_task_type, self.v_driver, self.log_file_object, self.v_input_wb, error_hospital_machine_learning_object) v_count = Error_Document_rejected_obj.execute_main(v_error_title, v_ticket_uid, output_sheet, earlier_str) v_end_time = time.time() report_file_object.update_sheet(self.v_username, v_count, math.floor(v_end_time - v_start_time), str(datetime.date.today())) if v_error_title == LocalElementLocator.WEB_DOC_REJECTED_ERROR_TITLE: self.log_file_object.log_to_file("INFO", "Seaching tickets for error title:- WebForms-ToService: document rejected") v_start_time = time.time() v_ticket_uid = excel_operation_object.get_value(index, 2) if v_ticket_uid is None: v_ticket_uid = ' ' Error_Document_rejected_obj = Error_Document_rejected(self.v_task_type, self.v_driver, self.log_file_object, self.v_input_wb, error_hospital_machine_learning_object) v_count = Error_Document_rejected_obj.execute_main(v_error_title, v_ticket_uid, output_sheet, earlier_str) v_end_time = time.time() report_file_object.update_sheet(self.v_username, v_count, math.floor(v_end_time - v_start_time), str(datetime.date.today())) else: self.log_file_object.log_to_file("ERROR", "Invalid error title ErrorHospital.execute_main()") time.sleep(3) self.v_driver.close()
def execute_main(self): self.lo.log_to_file( "INFO", "Executing ProductionDataMonitoring.execute_main()") self.v_driver = webdriver.Chrome(AppConstants.BROWSER_DRIVER) self.v_driver.maximize_window() lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) lg.login("Launchpad") self.lo.log_to_file("INFO", "Login in to Launchpad") time.sleep(5) self.v_driver.get(LocalElementLocator.TRANSACTION_TRACKER_PROD_LINK) self.TaskFilter(self.v_input_wb, 'InProgress') self.lo.log_to_file( "INFO", "completed ProductionDataMonitoring.execute_main()") self.v_driver.close()
def execute_main(self): # self.lo.log_to_file("INFO", "Login in to DC4 Pre_Prod") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) self.v_data_sheet = self.v_input_wb.get_sheet_by_name('PROCESS_TEST_FILES_INPUT') total_rows = self.v_data_sheet.max_row self.v_driver.maximize_window() lg.login("Launchpad") time.sleep(3) self.v_driver.get("https://commerce.spscommerce.com/transaction-tracker/prod/transactions/") time.sleep(5) tto=TransactionTrackerOperations(self.v_task_type, self.v_driver, self.lo) # tto.search_process_for_process_test_file("Spring Silver Foods Inc","C&S Wholesale","850","10/02/2018") tto.search_by_parcel_id_and_download("10944250370")
def execute_main(self): self.log.log_to_file( "INFO", "Executing CMProductionDataMonitoring.execute_main()") self.v_driver = webdriver.Chrome(AppConstants.BROWSER_DRIVER) self.v_driver.maximize_window() TransactionTrackerOperations_page_object = TransactionTrackerOperations( self.v_task_type, self.v_driver, self.log, self.v_input_sheet, self.v_input_wb, self.v_username, self.v_driver) self.log.log_to_file("INFO", "Login in to Launchpad") login_operations_object = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.log) login_operations_object.login("Launchpad") time.sleep(5) self.v_driver.get(LocalElementLocator.TRANSACTION_TRACKER_PROD_LINK) TransactionTrackerOperations_page_object.TaskFilter_for_CM_PDM( self.v_input_wb, 'InProgress') self.log.log_to_file( "INFO", "completed CMProductionDataMonitoring.execute_main()") self.v_driver.close()
def execute_main(self): print('in main method of PDM') self.v_driver = webdriver.Chrome(AppConstants.BROWSER_DRIVER) self.v_driver.maximize_window() self.lo.log_to_file("INFO", "Login in to Launchpad") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) print("asdasdsad") lg.login("Launchpad") time.sleep(5) self.v_driver.get(LocalElementLocator.TRANSACTION_TRACKER_PROD_LINK) time.sleep(5) if so.check_clickable_by_xpath( "html/body/app-reporting/div/div/nav-bar/div/nav"): print("Element clickable") else: print("Not clickable")
def execute_main(self): v_start_time = time.time() self.lo.log_to_file("INFO", "Login in to DC4 Prod") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) rf = ReportFileUtility(self.v_task_type) lg.login("DC4 Prod") #so.click_element(AppConstants.DC4_TAB, "BY_NAME") dc = DC4_Utility(self.v_task_type, self.v_driver, self.lo) dc.company_search_by_name('Midlab Inc') #dc.company_search_by_ISA_ID('6166651648') #dc.company_search_by_TPID('620TSTWONDERTRE') self.v_driver.close() v_end_time = time.time() rf.update_sheet(self.v_username, 2, math.floor(v_end_time - v_start_time), str(datetime.date.today()))
def execute_main(self): self.lo.log_to_file("INFO", "Executing Process_Test_Files.execute_main()") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) self.v_data_sheet = self.v_input_wb.get_sheet_by_name( 'PROCESS_TEST_FILES_INPUT') total_rows = self.v_data_sheet.max_row lg.login("Launchpad") self.v_driver.maximize_window() self.v_driver.execute_script("window.open('about:blank', 'tab2');") self.v_driver.switch_to.window("tab2") lg.login("DC4 PreProd") self.v_driver.execute_script("window.open('about:blank', 'tab3');") self.v_driver.switch_to.window("tab3") lg.login("FTP Pre-prod") for row_count in range(2, total_rows + 1): v_supplier = self.v_data_sheet.cell(row=row_count, column=1).value v_retailer = self.v_data_sheet.cell(row=row_count, column=2).value v_doc_type = self.v_data_sheet.cell(row=row_count, column=3).value v_date = self.v_data_sheet.cell(row=row_count, column=4).value if v_doc_type == CommonLocators.PO_File: ptf_850 = Process_Test_file_850(self.v_task_type, self.lo, self.v_username, self.v_input_wb, self.v_driver) ptf_850.execute_main(v_supplier, v_retailer, v_doc_type, row_count, v_date) else: self.lo.log_to_file( "ERROR", "Document is not found in Process_Test_Files.execute_main()" )
def execute_main(self): self.lo.log_to_file("INFO", "Login in to DC4 Prod") login_object = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) selenium_operation_object = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) # report_file_object = ReportFileUtility(self.v_task_type) total_rows = self.v_data_sheet.max_row print(total_rows) login_object.login("DC4 Prod") self.v_driver.maximize_window() for row_count in range(2, total_rows + 1): v_start_time = time.time() excel_operations = ExcelOperations(self.v_task_type, self.v_data_sheet) v_supplier = self.v_data_sheet.cell(row=row_count, column=1).value v_retailer = self.v_data_sheet.cell(row=row_count, column=2).value v_erp = self.v_data_sheet.cell(row=row_count, column=15).value print(v_retailer) print(v_erp) service_name = ["FItoService", "FIfromService"] v_doc_type = self.v_data_sheet.cell(row=row_count, column=3).value print(v_doc_type) v_date = self.v_data_sheet.cell(row=row_count, column=4).value if v_doc_type == 850: print(v_doc_type) Setup_U_Ob = QB_Setup_Util(self.v_task_type, self.lo, self.v_username, self.v_input_wb, self.v_driver) retailer_flag = Setup_U_Ob.retailer_v_check( v_supplier, v_retailer, v_doc_type, row_count) supplier_flag = Setup_U_Ob.Supplier_Setup_Check( v_supplier, v_retailer, v_doc_type, v_erp, row_count)
class DC4_Prod_Actions: # Check_Capability_Status def __init__(self, task_type, lo, username,v_Browser): self.v_input_wb = openpyxl.load_workbook(ElementLocators.INPUT_FILE_PATH) self.v_task_type = task_type self.v_input_sheet = self.v_input_wb.get_sheet_by_name("Input") self.v_input_sheet_maps = self.v_input_wb.get_sheet_by_name("Maps") self.v_input_sheet_Adaptor_Data_Type_ID = self.v_input_wb.get_sheet_by_name("Adaptor Data Type ID") self.log = lo self.v_username = username self.v_Browser=v_Browser self.so = SeleniumOperations(self.v_task_type, self.v_Browser, self.log) self.login_operations_object = Login(self.v_task_type, self.v_Browser, self.v_input_wb, self.log) self.so = SeleniumOperations(self.v_task_type, self.v_Browser, self.log) self.login_operations_object.login("Launchpad") self.login_operations_object.login("DC4 Prod") # time.sleep(5) # self.v_Browser.get("https://commerce.spscommerce.com/migrator/") # time.sleep(10) # self.Migrator("960468") # time.sleep(10000) # def Migrator(self, profile_uid): # # self.v_Browser.get("https://commerce.spscommerce.com/migrator/") # # time.sleep(10) # self.v_Browser.switch_to.frame(0) # time.sleep(5) # self.v_Browser.find_element_by_xpath(".//*[contains(text(),'Search by column')]//select").click() # time.sleep(2) # self.v_Browser.find_element_by_xpath(".//*[contains(text(),'profile_uid')]").click() # # time.sleep(3) # # driver.find_element_by_xpath(".//b").click() # time.sleep(4) # self.v_Browser.find_element_by_xpath( # "html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/a").click() # time.sleep(4) # self.v_Browser.find_element_by_xpath( # "html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/div/div/input").send_keys( # profile_uid) # # driver.find_element_by_xpath("html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/div/div/input").click() # time.sleep(3) # self.v_Browser.find_element_by_xpath( # "html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/div/div/input").clear() # self.v_Browser.find_element_by_xpath( # "html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/div/div/input").send_keys( # profile_uid) # time.sleep(3) # self.v_Browser.find_element_by_xpath(".//ul/li").click() # # self.v_Browser.switch_to.frame(0) # time.sleep(3) # self.v_Browser.find_element_by_xpath(".//*[contains(text(),'Export')]").click() # self.v_Browser.find_element_by_xpath(".//*[contains(text(),'Migrate')]").click() # # self.v_Browser.find_element_by_xpath(".//*[contains(@class,'medium button confirm')]").click() # print("clicked on migrator") def Migrator(self, relationship_uid): self.v_Browser.get("https://commerce.spscommerce.com/migrator/") time.sleep(10) self.v_Browser.switch_to.frame(0) self.so.click_element_by_xpath(".//*[contains(text(),'Table')]//select") self.so.click_element_by_xpath(".//*[contains(text(),'relationship')]") self.so.click_element_by_xpath("html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/a") self.so.send_text_by_xpath("html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/div/div/input",relationship_uid) time.sleep(8) self.so.send_text_by_xpath("html/body/div[1]/div/div/api-interaction/div/div[4]/label/chosen-select/div/div/div/input",relationship_uid) time.sleep(8) self.so.click_element_by_xpath(".//ul/li") self.so.click_element_by_xpath(".//*[contains(text(),'Export')]") time.sleep(15) self.so.click_element_by_xpath(".//*[contains(text(),'Migrate')]") time.sleep(15) print("clicked on migrator") def get_maps(self,doc_type,adaptor,retailer_version): for i in range(1,self.v_input_sheet_maps.max_row+1): doc_type_from_sheet = self.v_input_sheet_maps.cell(row=i, column=1).value if str(doc_type_from_sheet)==str(doc_type): supplier_version_from_sheet = self.v_input_sheet_maps.cell(row=i, column=2).value if adaptor=="Quickbooks" or adaptor=="Fishbowl": supplier_version="7.2" if adaptor=="Dwyer" or adaptor=="Peachtree": supplier_version="7" if str(supplier_version_from_sheet)==str(supplier_version): retailer_version_from_sheet = self.v_input_sheet_maps.cell(row=i, column=3).value if str(retailer_version_from_sheet)==str(retailer_version): maps=self.v_input_sheet_maps.cell(row=i, column=5).value arr_maps=maps.split(",") return arr_maps def get_capability_name(self,adaptor, doc): Quickbooks = {"810": ["SPS QuickBooks Adaptor | RSX 7.2 | 810 - Legacy", "106968"], "850": ["SPS QuickBooks Adaptor | RSX 7.2 | 850 - Legacy", "106967"], "875": ["SPS QuickBooks Adaptor | RSX 7.2 | 875 - Legacy", "110240"], "856": ["SPS Quickbooks Adapter RSX 7.2 | OzLink | 856", "135124"]} Fishbowl = {"810": ["SPS Fishbowl Adaptor | RSX 7.2 | 810 - Legacy", "109097"], "850": ["SPS Fishbowl Adaptor | RSX 7.2 | 850 - Legacy", "109095"], "875": ["SPS FISHBOWL ADAPTOR | RSX 7.2 | 875 - LEGACY", "112556"], "856": ["SPS Fishbowl Adaptor | RSX 7.2 | 856 - Legacy", "109096"]} Dwyer = {"810": ["Dwyer Adaptor V7 810 XML", "31788"], "850": ["Dwyer Adaptor V7 850 XML", "31768"], "875": ["Dwyer Adaptor V7 875 XML", "70230"]} Peachtree = {"810": ["Peachtree 810 XML", "73633"], "850": ["Peachtree 850 XML", "73632"], "875": ["Peachtree 875 XML", "78248"]} if adaptor == "Quickbooks": arr = Quickbooks.get(doc) return arr if adaptor == "Fishbowl": arr = Fishbowl.get(doc) return arr if adaptor == "Dwyer": arr = Dwyer.get(doc) return arr if adaptor == "Peachtree": arr = Peachtree.get(doc) return arr def Search_By_TPID(self,TPID): # self.so.click_element_by_xpath(ElementLocators.Browse_Customers) self.v_Browser.get(ElementLocators.DC4_Prod_link) self.so.click_element_by_xpath(ElementLocators.Customers_by_TPID) self.so.send_text_by_xpath(ElementLocators.TPID_input_box,TPID) self.so.click_element_by_xpath(ElementLocators.Search_button) Company_name=self.so.get_text_by_xpath(ElementLocators.Company_name) Profile_name=self.so.get_text_by_xpath(ElementLocators.Profile_name) return Company_name+"$"+Profile_name def Open_supplier(self,TPID): self.so.click_element_by_xpath(ElementLocators.First_company_name) self.so.click_element_by_xpath(ElementLocators.Relationships) self.so.click_element_by_xpath(ElementLocators.Relationships_Advanced) if self.so.check_exists_by_xpath(ElementLocators.Sender_as_Show_all): self.so.click_element_by_xpath(ElementLocators.Sender_as_Show_all) self.so.click_element_by_xpath(ElementLocators.Show_all_profile) self.so.click_element_by_xpath(ElementLocators.Receiver_as_Show_all) self.so.click_element_by_xpath(ElementLocators.Show_all_profile2) time.sleep(5) Retailer_name=self.so.get_text_by_xpath("//*[contains(text(),'"+str(TPID)+"') and contains(@id,'form1:table3:')]//preceding::span[5]") Relationship_UID_as_Sender=self.so.get_text_by_xpath("//*[contains(text(),'"+str(TPID)+"') and contains(@id,'form1:table3:')]//preceding::span[6]") Relationship_UID_as_Receiver=self.so.get_text_by_xpath("//*[contains(text(),'"+str(TPID)+"') and contains(@id,'form1:table4:')]//preceding::span[8]") self.so.click_element_by_xpath(ElementLocators.Relationship_Overview) self.so.send_text_by_xpath(ElementLocators.Search_TP_box,Retailer_name) self.so.click_element_by_xpath(ElementLocators.TP_Search_button) return Retailer_name+"$"+Relationship_UID_as_Sender+"$"+Relationship_UID_as_Receiver def Open_profile(self,Profile_name): Company_EDI_Summary=self.so.get_text_by_xpath(ElementLocators.Company_EDI_Summary) Trading_Partner_EDI_Summary=self.so.get_text_by_xpath(ElementLocators.Trading_Partner_EDI_Summary) self.so.click_element_by_xpath("//*[contains(text(),'"+str(Profile_name)+"')]") self.so.click_element_by_xpath(ElementLocators.Show) return Company_EDI_Summary+"$"+Trading_Partner_EDI_Summary def Add_New_Capability(self,Doc_Type,capability_ID): self.so.click_element_by_xpath(ElementLocators.createCapability) time.sleep(3) all_windows = self.v_Browser.window_handles num_of_windows = len(all_windows) print(num_of_windows) requested_window = all_windows[1] self.v_Browser.switch_to.window(requested_window) print(self.v_Browser.current_url) print("Total Window: " + str(num_of_windows)) self.v_Browser.switch_to.frame(0) if str(Doc_Type)=='850' or str(Doc_Type)=='875': service_UID='1007' if str(Doc_Type)=='810'or str(Doc_Type)=='855' or str(Doc_Type)== '856': service_UID='1006' self.so.send_text_by_xpath(ElementLocators.service,service_UID) self.so.send_text_by_xpath(ElementLocators.Data_Type,"["+capability_ID+"]") self.so.click_element_by_xpath(ElementLocators.submit_create_capability) self.v_Browser.switch_to.window(self.v_Browser.window_handles[0]) def add_existing_capability(self,capability_name,capability_ID,Doc_Type): self.so.click_element_by_xpath(ElementLocators.addExistingCapability) #switch window time.sleep(4) all_windows=self.v_Browser.window_handles num_of_windows=len(all_windows) requested_window=all_windows[1] self.v_Browser.switch_to.window(requested_window) print(self.v_Browser.current_url) print("Total Window: "+str(num_of_windows)) self.v_Browser.switch_to.frame(0) # seq = self.v_Browser.find_elements_by_tag_name('frame') # print("seq len") # print(len(seq)) # for index in range(len(seq)): # iframe = self.v_Browser.find_elements_by_tag_name('iframe')[index] # print(iframe) # i = 0 time.sleep(3) print("------------------") count=self.v_Browser.find_elements_by_xpath("//a[contains(text(),'Show')]") print(len(count)) print("------------------") # while True: status='' for i in range(len(count)): required_capability_name = self.so.get_text_by_xpath("//span[@id='form1:table1:" + str(i) + ":outputText6']") print(required_capability_name) if str(capability_name) == str(required_capability_name): print("capability matched...............") checkbox = "//input[@id='form1:table1:" + str(i) + ":tableSelectMany1']" capability_uid = "//span[@id='form1:table1:" + str(i) + ":outputText2']" self.so.click_element_by_xpath(checkbox) self.so.click_element_by_xpath(ElementLocators.cap_choose_btn) # self.v_Browser.close() self.v_Browser.switch_to.window(self.v_Browser.window_handles[0]) status='capability selected' break else: status='Capability not available' if status=="Capability not available": self.v_Browser.close() self.v_Browser.switch_to.window(self.v_Browser.window_handles[0]) self.Add_New_Capability(Doc_Type,capability_ID) return "filebroker_required" else: return "filebroker_not_required" print(status) # print("in while loop") # flag = self.so.check_exists_by_xpath(required_capability_name) # val=self.so.get_text_by_xpath(required_capability_name) # print(val) # if self.so.check_exists_by_xpath(required_capability_name): # print("in True loop") # name_from_UI = self.so.get_text_by_xpath(required_capability_name) # if name_from_UI == capability_name: # print("capability matched...............") # checkbox="//input[@id='form1:table1:"+str(i)+":tableSelectMany1']" # capability_uid="//span[@id='form1:table1:"+str(i)+":outputText2']" # self.so.click_element_by_xpath(checkbox) # # self.so.click_element_by_xpath(ElementLocators.choose_btn) # time.sleep(3) # # self.v_Browser.close() # print("about to close") # time.sleep(1190) # break # # if self.so.check_exists_by_xpath(required_capability_name)==False: # print("in false loop") # time.sleep(3) # self.v_Browser.close() # # requested_window = all_windows[0] # # self.v_Browser.switch_to.window(requested_window) # # self.so.click_element_by_xpath(ElementLocators.Relationships) # time.sleep(1900) # capability not available # click on # break # i += 1 # if flag==False: # break def Toggle_profile_capability(self,capability_name): self.so.click_element_by_xpath(ElementLocators.Profiles_Tab) time.sleep(3) i = 0 action = '' while True: Datatype_Name = "//span[@id='form1:table1:0:table2:" + str(i) + ":outputText14']" flag = self.so.check_exists_by_xpath(Datatype_Name) if flag == True: name_from_UI = self.so.get_text_by_xpath(Datatype_Name) if name_from_UI == capability_name: status = "//span[@id='form1:table1:0:table2:" + str(i) + ":outputText13']" checkbox = "//input[@id='form1:table1:0:table2:" + str(i) + ":tableSelectMany1'] " Extentions = "//a[@id='form1:table1:0:table2:" + str(i) + ":extensionPopup']" checkbox = "//input[@id='form1:table1:0:table2:" + str(i) + ":tableSelectMany1'] " Status = self.so.get_text_by_xpath(status) self.so.click_element_by_xpath(checkbox) self.so.click_element_by_xpath(ElementLocators.Toggle_profile_capability_status) self.so.click_element_by_xpath(ElementLocators.Profiles_Tab) # if Status == "Active": # action = "do_nothing" # break # if Status == "Disabled": # action = "do_nothing" # check exxtentions # self.so.click_element_by_xpath(checkbox) break if flag == False: # capability not available # click on # self.add_existing_capability(capability_name, capability_ID, Doc_Type) break i += 1 def filebroker(self,capability_name,doc_type,ftp_name): # def filebroker(self): # added_cap_UID="2820910" # doc_type="850" # ftp_name="Demo" self.so.click_element_by_xpath(ElementLocators.Capabilities) # self.so.send_text_by_xpath(ElementLocators.Capability_UID_textbox,added_cap_UID) self.so.send_text_by_xpath(ElementLocators.Datatype_Name_textbox,capability_name) self.so.click_element_by_xpath(ElementLocators.search_capability) self.so.click_element_by_xpath(ElementLocators.editFilebrokerSettingsButton) time.sleep(5) self.v_Browser.switch_to.window(self.v_Browser.window_handles[1]) self.v_Browser.switch_to.frame(0) self.so.click_element_by_xpath(ElementLocators.add_filebroker_btn) time.sleep(4) if doc_type=='850' or doc_type=='875': Archive_Directory_path="/u01/Arc/ftp/vendor/"+ftp_name+"/out" Directory_path="/u01/ftp/vendor/"+ftp_name+"/out" FilenameMacro="PO%p" time.sleep(2) select = Select(self.v_Browser.find_element_by_id('_idJsp4:_idJsp8')) select.select_by_visible_text('DC4 - Read or write files from/to DC4') time.sleep(2) select = Select(self.v_Browser.find_element_by_id('_idJsp4:_idJsp39')) select.select_by_visible_text('File - Read or write files from/to internal comms server') time.sleep(4) # # self.so.click_element_by_xpath(ElementLocators.Source_Channel) # self.so.click_element_by_xpath(ElementLocators.Source_Channel_text) # self.so.click_element_by_xpath("//*[contains(text(),'Destination Channel')]") # time.sleep(3) # self.so.click_element_by_xpath(ElementLocators.Destination_Channel) # time.sleep(3) # self.so.click_element_by_xpath(ElementLocators.Destination_Channel_text) # self.so.click_element_by_xpath("//*[contains(text(),'Destination Channel')]") # time.sleep(2) # self.so.send_text_by_xpath(ElementLocators.Source_Channel,"DC4") # self.so.click_element_by_xpath(ElementLocators.Destination_Channel) # self.so.send_text_by_xpath(ElementLocators.Destination_Channel,"File - Read or write files from/to internal comms server") self.so.click_element_by_xpath(ElementLocators.continue_btn) time.sleep(4) self.so.send_text_by_xpath(ElementLocators.ArchiveDirectory_fito,Archive_Directory_path) self.so.send_text_by_xpath(ElementLocators.Directory_fito,Directory_path) self.so.send_text_by_xpath(ElementLocators.FilenameMacro_fito,FilenameMacro) self.so.click_element_by_xpath(ElementLocators.Save_Changes_btn) time.sleep(3) self.v_Browser.switch_to.window(self.v_Browser.window_handles[0]) if doc_type=='810' or doc_type=='856': Archive_Directory_path="/u01/Arc/ftp/vendor/"+ftp_name+"/in" Directory_path="/u01/ftp/vendor/"+ftp_name+"/in" status="Active" if doc_type=='810': FileSpecification="IN*" if doc_type=='856': FileSpecification="ASN*" time.sleep(2) select = Select(self.v_Browser.find_element_by_id('_idJsp4:_idJsp8')) select.select_by_visible_text('File - Read or write files from/to internal comms server') time.sleep(2) select = Select(self.v_Browser.find_element_by_id('_idJsp4:_idJsp39')) select.select_by_visible_text('DC4 - Read or write files from/to DC4') time.sleep(2) select = Select(self.v_Browser.find_element_by_id('_idJsp4:_idJsp70')) select.select_by_visible_text('Active') time.sleep(2) self.so.click_element_by_xpath(ElementLocators.continue_btn) # self.so.click_element_by_xpath(ElementLocators.Source_Channel) # self.so.click_element_by_xpath((ElementLocators.Destination_Channel_text)) # self.so.click_element_by_xpath(ElementLocators.Destination_Channel) # self.so.click_element_by_xpath(ElementLocators.Source_Channel_text) # # self.so.send_text_by_xpath(ElementLocators.Source_Channel,"File - Read or write files from/to internal comms server") # self.so.send_text_by_xpath(ElementLocators.Destination_Channel,"DC4 - Read or write files from/to DC4") # self.so.click_element_by_xpath(ElementLocators.Status) # self.so.click_element_by_xpath(ElementLocators.Status_text) # self.so.send_text_by_xpath(ElementLocators.Status,status) time.sleep(3) self.so.send_text_by_xpath(ElementLocators.ArchiveDirectory_fifrom,Archive_Directory_path) self.so.send_text_by_xpath(ElementLocators.Directory_fifrom,Directory_path) self.so.send_text_by_xpath(ElementLocators.FileSpecification,FileSpecification) self.so.click_element_by_xpath(ElementLocators.Save_Changes_btn) time.sleep(3) self.v_Browser.switch_to.window(self.v_Browser.window_handles[0]) def Add_Extentions(self, capability_name,arr_maps,Doc_Type,ftp_name): total_extentions = len(arr_maps) time.sleep(5) self.so.click_element_by_xpath(ElementLocators.Profiles_Tab) time.sleep(3) i = 0 action = '' while True: Datatype_Name = "//span[@id='form1:table1:0:table2:" + str(i) + ":outputText14']" flag = self.so.check_exists_by_xpath(Datatype_Name) if flag == True: name_from_UI = self.so.get_text_by_xpath(Datatype_Name) if name_from_UI == capability_name: status = "//span[@id='form1:table1:0:table2:" + str(i) + ":outputText13']" checkbox = "//input[@id='form1:table1:0:table2:" + str(i) + ":tableSelectMany1']" Extentions = "//a[@id='form1:table1:0:table2:" + str(i) + ":extensionPopup']" checkbox = "//input[@id='form1:table1:0:table2:" + str(i) + ":tableSelectMany1']" Status = self.so.get_text_by_xpath(status) added_cap_UID=self.so.get_text_by_xpath("//span[@id='form1:table1:0:table2:" + str(i) + ":outputText24']") self.so.click_element_by_xpath(Extentions) time.sleep(4) self.v_Browser.switch_to.window(self.v_Browser.window_handles[1]) self.v_Browser.switch_to.frame(0) for i in range(total_extentions): self.so.click_element_by_xpath(ElementLocators.Add_Extention_btn) self.so.click_element_by_xpath(ElementLocators.map_1080) self.so.click_element_by_xpath(ElementLocators.map_1080_choose) for i in range(total_extentions): self.so.click_element_by_xpath("//a[@id='form1:table1dd"+str(i)+"']//img") for i in range(total_extentions): self.so.send_text_by_xpath("//input[@id='form1:table1:"+str(i)+":table2:0:outputText22']",arr_maps[i]) self.so.click_element_by_xpath(ElementLocators.Extention_Save_Changes) time.sleep(3) self.v_Browser.switch_to.window(self.v_Browser.window_handles[0]) ############################################################### self.filebroker(added_cap_UID, Doc_Type, ftp_name) # if Status == "Active": # action = "do_nothing" # break # if Status == "Disabled": # action = "do_nothing" # check exxtentions # self.so.click_element_by_xpath(checkbox) break if flag == False: # capability not available # click on # self.add_existing_capability(capability_name, capability_ID, Doc_Type) break i += 1 return added_cap_UID def Check_Capability_Status(self,capability_name,capability_ID,Doc_Type,arr_maps,ftp_name): time.sleep(4) i=0 action='' while True: Datatype_Name="//span[@id='form1:table1:0:table2:"+str(i)+":outputText14']" flag=self.so.check_exists_by_xpath(Datatype_Name) if flag==True: name_from_UI=self.so.get_text_by_xpath(Datatype_Name) if name_from_UI==capability_name: status="//span[@id='form1:table1:0:table2:"+str(i)+":outputText13']" checkbox="//input[@id='form1:table1:0:table2:"+str(i)+":tableSelectMany1'] " Extentions="//a[@id='form1:table1:0:table2:"+str(i)+":extensionPopup']" checkbox="//input[@id='form1:table1:0:table2:"+str(i)+":tableSelectMany1'] " Status=self.so.get_text_by_xpath(status) print(name_from_UI) print(Status) if Status=="Active": action="do_nothing" break if Status=="Disabled": action = "do_nothing" #check exxtentions # self.so.click_element_by_xpath(checkbox) break if flag==False: #capability not available #click on filebroker_required_or_not=self.add_existing_capability(capability_name,capability_ID,Doc_Type) self.Toggle_profile_capability(capability_name) self.Add_Extentions(capability_name,arr_maps,Doc_Type,ftp_name) if filebroker_required_or_not=="filebroker_required": self.filebroker(capability_name, Doc_Type, ftp_name) break i += 1
def execute_main(self): v_start_time = time.time() self.lo.log_to_file("INFO", "Login in to DC4 Pre-Prod") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) rf = ReportFileUtility(self.v_task_type) SeleniumOperations(self.v_task_type, self.v_driver, self.lo) output_sheet = self.v_input_wb.get_sheet_by_name('Output') input_sheet = self.v_input_wb.get_sheet_by_name('Input') input_sheet_ex = ExcelOperations(self.v_task_type, input_sheet) output_sheet_ex = ExcelOperations(self.v_task_type, output_sheet) self.v_driver.maximize_window() Max_row = input_sheet.max_row current_row = 2 #Max_row = output_sheet.max_row #current_row_output = 2 lg.login("DC4 PreProd") while (current_row <= Max_row): v_TPID = input_sheet.cell(row=current_row, column=1).value v_Doc_850 = input_sheet.cell(row=current_row, column=2).value if (v_Doc_850 == 'Y'): v_doc = '850' V_supplier_doc_version = '7.4' dc = DC4_Utility(self.v_task_type, self.v_driver, self.lo) dc.company_search_by_TPID(v_TPID) self.lo.log_to_file("INFO", "Searching Supplier Data") V_Supplier_Profile_name = so.get_text_by_xpath( '//*[@id="table2"]/table/tbody/tr/td/table/tbody/tr[2]/td[2]') V_Supplier_name = so.get_text_by_xpath( '//*[@id="table2:0:commandLink4"]') print("Supplier Name = " + V_Supplier_name) output_sheet_ex.set_value(current_row, 1, V_Supplier_name) print("Supplier Profile = " + V_Supplier_Profile_name) so.click_element_by_xpath('//*[@id="table2:0:commandLink4"]') so.click_element_by_xpath( '//*[@id="form1:panelPage1"]/table/tbody/tr[3]/td/table/tbody/tr/td[2]/table/tbody/tr/td[3]/a' ) self.lo.log_to_file("INFO", "Searching Retailer Data") V_retailer_name, V_retailer_profile, V_supplier_row_index = self.search_retailer_profile( V_Supplier_Profile_name) #print(V_retailer_name, V_retailer_profile, V_supplier_row_index) if V_retailer_name == V_retailer_profile == V_supplier_row_index == False: print('No relationship found') self.lo.log_to_file( "INFO", "No relationship found, going to next row") output_sheet_ex.set_value(current_row, 4, 'Relationship not found') current_row = current_row + 1 else: print("Retailer Name = " + V_retailer_name) output_sheet_ex.set_value(current_row, 2, V_retailer_name) print("Retailer Profile = " + V_retailer_profile) self.lo.log_to_file("INFO", "Searching Retailer Map Versions") V_ret_document, V_ret_doc_status, V_ret_doc_service, V_ret_doc_version = self.search_retailer_map( v_doc, V_retailer_profile, V_Supplier_Profile_name, V_Supplier_name) V_supplier_map_version, V_supplier_profile_map_name, V_supplier_map_row_index = self.check_supplier_profile( V_Supplier_Profile_name, v_doc, V_supplier_row_index) print("Supplier Map version = " + V_supplier_map_version) print("Supplier Map Name" + V_supplier_profile_map_name) output_sheet_ex.set_value(current_row, 3, V_ret_document) self.v_input_wb.save(AppConstants.INPUT_FILE_PATH) self.lo.log_to_file("INFO", "Maps and version found") V_send_suuplier_map_index = int(V_supplier_map_row_index) V_send_suuplier_map_index = V_send_suuplier_map_index - 2 status = self.add_extensions(V_ret_doc_version, V_supplier_doc_version, V_send_suuplier_map_index) #print(status) if status == 'None': output_sheet_ex.set_value(current_row, 4, 'Success') else: output_sheet_ex.set_value(current_row, 4, 'Fail') current_row = current_row + 1 self.v_driver.close() v_end_time = time.time() rf.update_sheet(self.v_username, 2, math.floor(v_end_time - v_start_time), str(datetime.date.today()))
def execute_main(self): v_start_time = time.time() self.lo.log_to_file("INFO", "Login in to DC4 Prod") lg = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) so = SeleniumOperations(self.v_task_type,self.v_driver,self.lo) ehu = ErrorHospital_Utility(self.v_task_type,self.v_driver,self.lo) rf = ReportFileUtility(self.v_task_type) output_sheet = self.v_input_wb.get_sheet_by_name('Output') input_sheet = self.v_input_wb.get_sheet_by_name('Input') eo = ExcelOperations(self.v_task_type, input_sheet) output_sheet_eo = ExcelOperations(self.v_task_type, output_sheet) output_sheet_curr_row = 2 for index in range(2,input_sheet.max_row+1): list_duplicate_ticket_uid = [] today = datetime.datetime.now() DD = datetime.timedelta(days=14) earlier = today - DD earlier_str = earlier.strftime("%Y-%m-%d") earlier_str = earlier_str+' 00:00:00' lg.login("DC4 Prod") v_error_title = eo.get_value(index, 1) if v_error_title == LocalElementLocator.ADHOC_ERROR_TITLE: v_ticket_uid = eo.get_value(index, 2) if v_ticket_uid is None: v_ticket_uid = ' ' ehu.adhoc_error_search(v_ticket_uid,earlier_str,' ') if so.check_exists_by_xpath(LocalElementLocator.EH_SHOW_ALL_TAB_XPATH): so.click_element_by_xpath(LocalElementLocator.EH_SHOW_ALL_TAB_XPATH) tuid_index = 2 while(ehu.get_ticket_uid(tuid_index)): temp_ticket_uid = ehu.get_ticket_uid(tuid_index) temp_receiver = ehu.get_receiver_name(tuid_index) temp_sender = ehu.get_sender_name(tuid_index) if temp_ticket_uid not in list_duplicate_ticket_uid: ehu.adhoc_error_search(temp_ticket_uid,earlier_str,' ') v_tpid, v_doctype = ehu.get_info_from_description(tuid_index-2) ehu.adhoc_error_search(' ', earlier_str,v_tpid) if so.check_exists_by_xpath(LocalElementLocator.EH_SHOW_ALL_TAB_XPATH): so.click_element_by_xpath(LocalElementLocator.EH_SHOW_ALL_TAB_XPATH) temp_tuid_index = 2 while (ehu.get_ticket_uid(temp_tuid_index)): list_duplicate_ticket_uid.append(ehu.get_ticket_uid(temp_tuid_index)) temp_tuid_index = temp_tuid_index+1 output_sheet_eo.set_value(output_sheet_curr_row, 1, temp_ticket_uid) output_sheet_eo.set_value(output_sheet_curr_row, 2, temp_sender) output_sheet_eo.set_value(output_sheet_curr_row, 3, temp_receiver) output_sheet_eo.set_value(output_sheet_curr_row, 4, v_tpid) output_sheet_eo.set_value(output_sheet_curr_row, 5, v_doctype) output_sheet_curr_row = output_sheet_curr_row+1 self.v_input_wb.save(AppConstants.INPUT_FILE_PATH) ehu.adhoc_error_search(v_ticket_uid, earlier_str, ' ') if so.check_exists_by_xpath(LocalElementLocator.EH_SHOW_ALL_TAB_XPATH): so.click_element_by_xpath(LocalElementLocator.EH_SHOW_ALL_TAB_XPATH) tuid_index = tuid_index+1 #so.click_element(AppConstants.DC4_TAB, "BY_NAME") #dc = DC4_Utility(self.v_task_type, self.v_driver, self.lo) #dc.company_search_by_name('Midlab Inc') #dc.company_search_by_ISA_ID('6166651648') #dc.company_search_by_TPID('620TSTWONDERTRE') self.v_driver.close() v_end_time = time.time() rf.update_sheet(self.v_username, 2, math.floor(v_end_time - v_start_time), str(datetime.date.today()))
def execute_main(self): db_object = DatabaseUtility(self.v_task_type, self.lo) if db_object.connection(): self.lo.log_to_file('INFO', 'Successful Connection') else: self.lo.log_to_file('ERROR', 'DB Server is not active') return v_start_time = time.time() self.lo.log_to_file("INFO", "Login in to DC4 Prod") login_obj = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) selenium_operation_obj = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) report_file_obj = ReportFileUtility(self.v_task_type) input_sheet = self.v_input_wb.get_sheet_by_name('Input') input_sheet_row_count = input_sheet.max_row excel_operation_obj = ExcelOperations(self.v_task_type, input_sheet) Web_Fulfillment_Utility_obj = Web_Fulfillment_Utility( self.v_task_type, self.v_driver, self.v_input_wb, self.lo, self.v_username, db_object) login_obj.login("Salesforce") self.v_driver.execute_script( "window.open('http://dc4ui.p01.pro:7777/dc4custmanager/faces/home.jsp', 'new_window')" ) # self.v_driver.execute_script( # "window.open('https://atlassian.spscommerce.com/browse/FICS-163692', 'new_window')") self.v_driver.switch_to.window(self.v_driver.window_handles[-1]) report_file_object = ReportFileUtility(self.v_task_type) time.sleep(2) login_obj.login("DC4 Prod") input_row = excel_operation_obj.get_value(2, 4) FICS_Number = excel_operation_obj.get_value(input_row, 1) while (FICS_Number != None): v_start_time = time.time() v_salesforce_id = FICS_Number self.v_driver.switch_to.window(self.v_driver.window_handles[0]) time.sleep(2) #self.v_driver.get('https://atlassian.spscommerce.com/browse/'+FICS_Number) #v_supplier_name, v_email_address, v_phone_number, v_retailer_name, v_billing_address, v_vendor_number, v_retailer_web_company_uid, v_account_number, v_retailer_dc4_company_uid, v_contact_name, v_salesforce_id = Web_Fulfillment_Utility_obj.get_info_from_JIRA() v_supplier_name, v_email_address, v_phone_number, v_retailer_name, v_billing_address, v_vendor_number, v_retailer_web_company_uid, v_account_number, v_retailer_dc4_company_uid, v_contact_name = Web_Fulfillment_Utility_obj.get_info_from_salesforce( v_salesforce_id) print(v_salesforce_id + "\n" + v_supplier_name + "\n" + v_email_address + "\n" + v_phone_number + "\n" + v_retailer_name + "\n" + v_vendor_number + "\n" + v_retailer_web_company_uid + "\n" + v_account_number + "\n" + v_retailer_dc4_company_uid + "\n" + v_contact_name) print(v_billing_address) self.v_driver.switch_to.window(self.v_driver.window_handles[-1]) time.sleep(2) try: #Web_Fulfillment_Utility_obj.get_data_for_library(v_salesforce_id, v_supplier_name, v_retailer_name, v_retailer_dc4_company_uid, FICS_Number) Web_Fulfillment_Utility_obj.run_setup_tool( v_salesforce_id, v_supplier_name, v_email_address, v_phone_number, v_retailer_name, v_billing_address, v_vendor_number, v_retailer_web_company_uid, v_account_number, v_retailer_dc4_company_uid, v_contact_name) except: self.v_driver.save_screenshot(AppConstants.APP_RUNNER_PATH + v_salesforce_id + '.png') print(input_row) v_end_time = time.time() report_file_object.update_sheet( self.v_username, 1, math.floor(v_end_time - v_start_time), str(datetime.date.today())) input_row = input_row + 1 excel_operation_obj.set_value(2, 4, input_row) FICS_Number = excel_operation_obj.get_value(input_row, 1) time.sleep(2)
def execute_main(self): t1 = threading.Thread(target=self.thread1) t2 = threading.Thread(target=self.thread2) t1.start() t2.start() t1.join() t2.join() db_object = DatabaseUtility(self.v_task_type, self.lo) if db_object.connection(): self.lo.log_to_file('INFO', 'Successful Connection') else: self.lo.log_to_file('ERROR', 'DB Server is not active') return v_start_time = time.time() self.lo.log_to_file("INFO", "Login in to DC4 Prod") login_obj = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) selenium_operation_obj = SeleniumOperations(self.v_task_type, self.v_driver, self.lo) report_file_obj = ReportFileUtility(self.v_task_type) input_sheet = self.v_input_wb.get_sheet_by_name('Input') input_sheet_row_count = input_sheet.max_row excel_operation_obj = ExcelOperations(self.v_task_type, input_sheet) Web_Fulfillment_Utility_obj = Web_Fulfillment_Utility( self.v_task_type, self.v_driver, self.v_input_wb, self.lo, self.v_username, db_object, self.v_driver_mv) # login_obj.login("Salesforce") self.v_driver.execute_script( "window.open('http://dc4ui.p01.pro:7777/dc4custmanager/faces/home.jsp', 'new_window')" ) # self.v_driver.execute_script( # "window.open('https://atlassian.spscommerce.com/browse/FICS-163692', 'new_window')") self.v_driver.switch_to.window(self.v_driver.window_handles[-1]) report_file_object = ReportFileUtility(self.v_task_type) time.sleep(2) login_obj.login("DC4 Prod") input_row = input_sheet_row_count + 1 FICS_Number = excel_operation_obj.get_value(input_row, 1) flag = 1 count = 0 v_start_time = time.time() while (flag): v_start_time1 = time.time() v_salesforce_id = easygui.enterbox('Please enter salesforce ID') self.v_driver.switch_to.window(self.v_driver.window_handles[0]) time.sleep(2) #self.v_driver.get('https://atlassian.spscommerce.com/browse/'+FICS_Number) #v_supplier_name, v_email_address, v_phone_number, v_retailer_name, v_billing_address, v_vendor_number, v_retailer_web_company_uid, v_account_number, v_retailer_dc4_company_uid, v_contact_name, v_salesforce_id = Web_Fulfillment_Utility_obj.get_info_from_JIRA() v_supplier_name, v_email_address, v_phone_number, v_retailer_name, v_billing_address, v_vendor_number, v_retailer_web_company_uid, v_account_number, v_retailer_dc4_company_uid, v_contact_name, client_uid, retailer_uid = Web_Fulfillment_Utility_obj.get_info_from_salesforce( v_salesforce_id) print(v_salesforce_id + "\n" + v_supplier_name + "\n" + v_email_address + "\n" + v_phone_number + "\n" + v_retailer_name + "\n" + v_vendor_number + "\n" + v_retailer_web_company_uid + "\n" + v_account_number + "\n" + v_retailer_dc4_company_uid + "\n" + v_contact_name) print(v_billing_address) self.v_driver.switch_to.window(self.v_driver.window_handles[-1]) time.sleep(2) #Web_Fulfillment_Utility_obj.get_data_for_library(v_salesforce_id, v_supplier_name, v_retailer_name, v_retailer_dc4_company_uid, FICS_Number) Web_Fulfillment_Utility_obj.run_setup_tool( v_salesforce_id, v_supplier_name, v_email_address, v_phone_number, v_retailer_name, v_billing_address, v_vendor_number, v_retailer_web_company_uid, v_account_number, v_retailer_dc4_company_uid, v_contact_name, client_uid, retailer_uid) print(input_row) count = count + 1 excel_operation_obj.set_value(input_row, 1, count) FICS_Number = excel_operation_obj.get_value(input_row, 1) v_end_time1 = time.time() excel_operation_obj.set_value( input_row, 2, math.floor(v_end_time1 - v_start_time1)) excel_operation_obj.set_value(input_row, 3, datetime.date.today()) print( '----------------------------------------------\n\nExecution Time: ' + str(math.floor(v_end_time1 - v_start_time1)) + ' count: ' + str(count) + '\n\n-------------------------') time.sleep(2) input_row = input_row + 1 self.v_input_wb.save(AppConstants.INPUT_FILE_PATH) flag = easygui.ynbox('Do you want to run one more setup?') v_end_time = time.time() report_file_object.update_sheet(self.v_username, count, math.floor(v_end_time - v_start_time), str(datetime.date.today()))
def thread2(self): login_obj = Login(self.v_task_type, self.v_driver_mv, self.v_input_wb, self.lo) login_obj.login('Launchpad') time.sleep(5)
def thread1(self, ): login_obj = Login(self.v_task_type, self.v_driver, self.v_input_wb, self.lo) login_obj.login("Salesforce") time.sleep(5)