def test_MessageTemplateOption(self): try: browserInstance = setupValue() adminfunction=Adminclass() browser = browserInstance.setupfunction() LauncheTender = LauncheTenderclass() logOut=Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) adminfunction=Adminclass() adminfunction.NotificationMessages(browser) time.sleep(3) browser.find_element_by_link_text(orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','MessageLinkSelection')).click() time.sleep(3) rValue=str(orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','MessageLinkSelection')) TextMessage ='Notification message '+'-'+' '+rValue self.assertTrue(TextMessage in browser.page_source) self.assertTrue('User' in browser.page_source) self.assertTrue('Organisation' in browser.page_source) self.assertTrue('Project' in browser.page_source) self.assertTrue('Tender' in browser.page_source) except Exception: logs.error("Validation with Test Case No: 100082 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100082 failed") browser.implicitly_wait(5) finally: browser=logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_TenderListfunction(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction = TenderClass() logOut = Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName = TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName, browser) NewTender = TenderAction.TenderCreation(browser) BacktoList = TenderAction.BacktoTenderList(browser, NewTender) time.sleep(2) TenderList = orgLink.readfromXML( folder_path + '\Data\TenderData.xml', 'eTender', 'TradeList') self.assertTrue(TenderList in browser.page_source) logs.info("Test Case No : 100212 Passed Successfully") except Exception: logs.error("Validation with Test Case No: 100212 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100212 failed") finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_TenderUpdationfunction(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction=TenderClass() logOut=Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName=TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName,browser) NewTender=TenderAction.TenderCreation(browser) UpdateTender=TenderAction.TenderUpdation(NewTender,browser) time.sleep(2) self.assertTrue(UpdateTender in browser.page_source) logs.info("Test Case No : 100199 Passed Successfully") except Exception: logs.error("Validation with Test Case No: 100196 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100199 failed") finally: browser=logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_Supplierfunction(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction = TenderClass() logOut = Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName = TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName, browser) NewTender = TenderAction.TenderCreation(browser) time.sleep(3) TenderAction.OpenDetails(browser, NewTender) time.sleep(3) TenderAction.OpenLookup(browser) time.sleep(3) self.assertTrue( browser.find_element_by_xpath( orgLink.readfromXML(folder_path + '\Object\TenderPage.xml', 'eTender', 'Lookupwindow'))) browser.find_element_by_tag_name('body').send_keys(Keys.ESCAPE) logs.info("Test Case No : 100232 Passed Successfully") except Exception: browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100232 failed") finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_OntimeStatus(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction = TenderClass() logOut = Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName = TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName, browser) NewTender = TenderAction.TenderCreation(browser) time.sleep(3) TenderAction.OpenDetails(browser, NewTender) time.sleep(3) TenderAction.OpenTenderPlan(browser) time.sleep(3) browser.find_element_by_xpath( orgLink.readfromXML(folder_path + '\Object\TenderPage.xml', 'eTender', 'SelectTemplate')).click() time.sleep(3) p = browser.find_element_by_xpath( orgLink.readfromXML(folder_path + '\Object\TenderPage.xml', 'eTender', 'PlanTemplateSearch')) time.sleep(2) p.send_keys( orgLink.readfromXML(folder_path + '\Data\TenderData.xml', 'eTender', 'TemplateData')) checkbox = browser.find_elements_by_xpath( orgLink.readfromXML(folder_path + '\Object\TenderPage.xml', 'eTender', 'TemplateCheckbox')) time.sleep(2) checkbox[1].click() browser.find_element_by_xpath( orgLink.readfromXML(folder_path + '\Object\TenderPage.xml', 'eTender', 'SelectPlanBtn')).click() time.sleep(3) tenderStatus = browser.find_element_by_xpath( orgLink.readfromXML(folder_path + '\Object\TenderPage.xml', 'eTender', 'OntimeStatus')).get_attribute('innerHTML') time.sleep(3) self.assertEquals( tenderStatus, orgLink.readfromXML(folder_path + '\Data\TenderData.xml', 'eTender', 'OStagestatus')) logs.info("Test Case No : 100288 Passed Successfully") except Exception: logs.error("Validation with Test Case No: 100288 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100288 failed") finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_ExcelExport(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction=TenderClass() logOut=Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName=TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName,browser) NewTender=TenderAction.TenderCreation(browser) time.sleep(3) TenderAction.OpenDetails(browser,NewTender) time.sleep(3) TenderAction.OpenTenderPlan(browser) time.sleep(3) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','SelectTemplate')).click() time.sleep(3) p=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','PlanTemplateSearch')) time.sleep(2) p.send_keys(orgLink.readfromXML(folder_path+'\Data\TenderData.xml','eTender','TemplateData')) checkbox=browser.find_elements_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','TemplateCheckbox')) time.sleep(2) checkbox[1].click() browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','SelectPlanBtn')).click() time.sleep(2) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','SaveBtn')).click() time.sleep(2) browser.find_element_by_link_text(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','PlanLink')).click() time.sleep(2) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','ExportButton')).click() time.sleep(2) os.path.exists(dpathfile) if os.path.isfile(dpathfile): os.remove(dpathfile) else: raise OSError logs.info("Test Case No : 100301 Passed Successfully") except NoSuchElementException: logs.error("Validation with Test Case No: 100301 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100301 failed") except OSError: self.fail("Test Case No: 100301 failed - File doesn't exists") except Exception: logs.error("Validation with Test Case No: 100301 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100301 failed") finally: browser=logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_FootNote(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction = TenderClass() adminfunction = Adminclass() logOut = Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(4) orgInstance = Organizationclass() orgInstance.OpenUserProfilePage(browser) time.sleep(2) browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\UserProfileObject.xml', 'eTender', 'SignatureBox')).clear() fakeValue = Factory.create() Signote = fakeValue.name() SignoteValue = str(Signote) browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\\Object\\UserProfileObject.xml', 'eTender', 'SignatureBox')).send_keys(SignoteValue) sbutton = browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\\Object\\UserProfileObject.xml', 'eTender', 'savebutton')) time.sleep(2) browser.execute_script("arguments[0].scrollIntoView(true);", sbutton) time.sleep(2) sbutton.click() adminfunction.EmailSetup(browser) time.sleep(2) footnote = browser.find_element_by_xpath( orgLink.readfromXML(folder_path + '\\Object\\EmailSetup.xml', 'eTender', 'FootNote')).get_attribute('innerText') time.sleep(2) time.sleep(3) sfootnote = str(footnote) sfootnote = sfootnote.strip() self.assertEquals(SignoteValue, sfootnote) logs.info("Test Case No : 100355 Passed Successfully") except Exception: logs.error("Test Case No: 100355 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100355 failed") finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_SetupEmailPage(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction = TenderClass() logOut = Userprofilemenu() adminfunction = Adminclass() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) adminfunction.EmailSetup(browser) time.sleep(2) self.assertTrue( browser.find_element_by_id( orgLink.readfromXML( folder_path + '\Data\EmailSetupData.xml', 'eTender', 'LogSelector'))) self.assertTrue( browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Data\EmailSetupData.xml', 'eTender', 'CropImage'))) self.assertTrue( browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Data\EmailSetupData.xml', 'eTender', 'Invitation'))) self.assertTrue( browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Data\EmailSetupData.xml', 'eTender', 'ViewDetails'))) self.assertTrue( browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Data\EmailSetupData.xml', 'eTender', 'ResetBtn'))) self.assertTrue( browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Data\EmailSetupData.xml', 'eTender', 'SaveBtn'))) logs.info("Test Case No : 100361 Passed Successfully") except Exception: logs.error("Test Case No: 100361 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100361 failed") finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_MessageTemplateSave(self): try: browserInstance = setupValue() adminfunction=Adminclass() browser = browserInstance.setupfunction() LauncheTender = LauncheTenderclass() logOut=Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) adminfunction=Adminclass() adminfunction.NotificationMessages(browser) time.sleep(3) browser.find_element_by_link_text(orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','MessageLinkSelection')).click() time.sleep(3) p=browser.find_element_by_class_name(orgLink.readfromXML(folder_path+'\Object\AdminEstimator.xml','eTender','TemplateTextBox')) p.clear() browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\AdminEstimator.xml','eTender','User')).click() time.sleep(1) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\AdminEstimator.xml','eTender','Organization')).click() time.sleep(1) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\AdminEstimator.xml','eTender','Project')).click() time.sleep(1) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\AdminEstimator.xml','eTender','Tender')).click() time.sleep(3) browser.find_element_by_link_text(orgLink.readfromXML(folder_path+'\Object\AdminEstimator.xml','eTender','SaveBtn')).click() time.sleep(2) browser.find_element_by_link_text(orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','MessageLinkSelection')).click() time.sleep(2) Nuser=str("["+orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','user')+"]") Norganization=str("["+orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','organization')+"]") Nproject=str("["+orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','project')+"]") Ntender=str("["+orgLink.readfromXML(folder_path+'\Data\AdminEstimatorData.xml','eTender','tender')+"]") time.sleep(2) self.assertTrue(Nuser in browser.page_source) self.assertTrue(Nuser in browser.page_source) self.assertTrue(Nuser in browser.page_source) self.assertTrue(Nuser in browser.page_source) except Exception: logs.error("Validation with Test Case No: 100181 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100181 failed") browser.implicitly_wait(5) finally: browser=logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_ForeCastDate(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction=TenderClass() logOut=Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName=TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName,browser) dateflag=0 NewTender=TenderAction.TenderCreationwithStartDate(browser,dateflag) time.sleep(3) Datevalue=TenderAction.startdate Startdate = datetime.strptime(Datevalue, '%d-%b-%Y') time.sleep(3) TenderAction.OpenDetails(browser,NewTender) time.sleep(3) TenderAction.OpenTenderPlan(browser) time.sleep(3) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','SelectTemplate')).click() time.sleep(3) p=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','PlanTemplateSearch')) time.sleep(2) p.send_keys(orgLink.readfromXML(folder_path+'\Data\TenderData.xml','eTender','TemplateData')) checkbox=browser.find_elements_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','TemplateCheckbox')) time.sleep(2) checkbox[1].click() browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','SelectPlanBtn')).click() time.sleep(3) foreText=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','ForeCastDateText')).get_attribute('value') Foredate=datetime.strptime(Datevalue, '%d-%b-%Y') self.assertEquals(Startdate,Foredate) logs.info("Test Case No : 100306 Passed Successfully") except Exception: logs.error("Validation with Test Case No: 100306 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100306 failed") finally: browser=logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_ExcelDetailsExport(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction=TenderClass() logOut=Userprofilemenu() time.sleep(2) browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) ProjName=TenderAction.ProjectCreation(browser) TenderAction.OpenProject(ProjName,browser) NewTender=TenderAction.TenderCreation(browser) downloadfile=NewTender+".xlsx" dpath=setupValue().downloadpath dpathfile=os.path.join(dpath,downloadfile) time.sleep(2) TenderAction.OpenDetails(browser,NewTender) time.sleep(2) browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','ExportDetailButton')).click() time.sleep(2) os.path.exists(dpathfile) if os.path.isfile(dpathfile): os.remove(dpathfile) else: raise OSError logs.info("Test Case No : 100341 Passed Successfully") except NoSuchElementException: logs.error("Validation with Test Case No: 100341 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100341 failed") except OSError: self.fail("Test Case No: 100341 failed - File doesn't exists") except Exception: logs.error("Validation with Test Case No: 100341 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100341 failed") finally: browser=logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_MessageOption(self): try: browserInstance = setupValue() adminfunction = Adminclass() browser = browserInstance.setupfunction() LauncheTender = LauncheTenderclass() logOut = Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) adminfunction = Adminclass() adminfunction.NotificationMessages(browser) time.sleep(3) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageTenderUpdate') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageDuedate') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageTenderDeletion') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageDueDateReminder') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageNewRegist') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageAddUser') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageRoleUpdate') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageRemoveUser') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageTenderSubmit') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageTenderDecline') in browser.page_source) self.assertTrue( orgLink.readfromXML( folder_path + '\Data\AdminEstimatorData.xml', 'eTender', 'MessageTenderAcceptance') in browser.page_source) except Exception: logs.error("Validation with Test Case No: 100082 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100082 failed") browser.implicitly_wait(5) finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_TenderReturnSaveVerify(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(10) LauncheTender = LauncheTenderclass() TenderAction = TenderClass() adminfunction = Adminclass() logOut = Userprofilemenu() browser = LauncheTender.openURL(browser) browser = LauncheTender.estimatorValidlogin1(browser) time.sleep(3) adminfunction.GeneralSettings(browser) time.sleep(2) try: ButtonTrue = browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\GeneralSettings.xml', 'eTender', 'TenderReturnTrue')) ButtonTrue.click() browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\GeneralSettings.xml', 'eTender', 'SaveBtn')).click() time.sleep(2) adminfunction.OpenTags(browser) adminfunction.GeneralSettings(browser) time.sleep(2) try: browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\GeneralSettings.xml', 'eTender', 'TenderReturnFalse')) except NoSuchElementException: return False except NoSuchElementException: try: ButtonFalse = browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\GeneralSettings.xml', 'eTender', 'TenderReturnFalse')) ButtonFalse.click() time.sleep(2) browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\GeneralSettings.xml', 'eTender', 'SaveBtn')).click() adminfunction.OpenTags(browser) adminfunction.GeneralSettings(browser) time.sleep(2) try: browser.find_element_by_xpath( orgLink.readfromXML( folder_path + '\Object\GeneralSettings.xml', 'eTender', 'TenderReturnTrue')) except NoSuchElementException: return False except NoSuchElementException: return False logs.info("Test Case No : 100381 Passed Successfully") return True except Exception: logs.error("Test Case No: 100381 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100381 failed") finally: browser = logOut.logout_eTender(browser) LauncheTender.closebrowser(browser)
def test_Tenderitemsimport(self): try: browserInstance = setupValue() browser = browserInstance.setupfunction() browser.implicitly_wait(5) time.sleep(1) setup = DataDriver() env = setup.readfromXML(folder_path + '\Env\Setup.xml', 'eTender', 'browser') if env == 'firefox': LauncheTender1 = LauncheTenderclass() browser = LauncheTender1.openURL(browser) time.sleep(1) browser = LauncheTender1.estimatorValidlogin1(browser) time.sleep(5) tendertemplate = Tenderplans() tenderDetails = Tenderdetails() itemdetails = ItemDetails() browser = tenderDetails.Subcontratorproject(browser) time.sleep(2) tenderclass = TenderClass() browser = tendertemplate.estimatortenderpalntender( browser ) #Go to new tenderE:\etender\TestScript\tenderitemsimport.py time.sleep(1) browser = itemdetails.estimatoritemdefault( browser) #Select Details from dropdown list time.sleep(1) browser = itemdetails.edititems( browser) #click edit tender items button time.sleep(1) browser = itemdetails.importlink( browser) #Click on Import link time.sleep(1) browser = itemdetails.importitems( browser) #Import Items from excel time.sleep(1) browser = itemdetails.additemsave(browser) #Save item details time.sleep(1) importitems_excel = DataDriver() time.sleep(1) importitemsexcel_path = importitems_excel.readfromXML( folder_path + '\Object\Itemsobject.xml', 'eTender', 'itemsintender') importitemsexcel = browser.find_elements_by_xpath( importitemsexcel_path) time.sleep(1) self.assertEqual(importitemsexcel[1].text, 'GROUNDWORK') time.sleep(2) validateitemsexcel_path = importitems_excel.readfromXML( folder_path + '\Object\Itemsobject.xml', 'eTender', 'itemdescription') validateitemsexcel = browser.find_element_by_xpath( validateitemsexcel_path) time.sleep(1) self.assertEqual(validateitemsexcel.text, 'machine loading') time.sleep(2) logs.info("Test Case No : 100317 Passed Successfully") time.sleep(1) elif env == 'chrome': print( "chrome does not support uploading documents using AUTOIT") except Exception: logs.error("Validation with Test Case No: 100317 failed") browser.save_screenshot(fullpath) traceback.print_exc(file=sys.stdout) self.fail("Test Case No: 100317 failed") browser.implicitly_wait(5) finally: LauncheTender1 = LauncheTenderclass() LauncheTender1.closebrowser(browser)