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)
示例#2
0
 def test_duplicatetagverification(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         logOut = Userprofilemenu()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.estimatorValidlogin(browser)
         orgInstance = Organizationclass()
         adminfunction.OpenTags(browser)
         fake = Factory.create()
         fakevalue = fake.name()
         tagString = str(fakevalue)
         adminfunction.TagCreation(browser, tagString)
         time.sleep(2)
         adminfunction.TagCreation(browser, tagString)
         message = str('Tag with name ' + '[' + tagString + ']' +
                       ' already exist')
         self.assertTrue(message in browser.page_source)
     except Exception:
         logs.error("Validation with Test Case No: 100178 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100178 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender1.closebrowser(browser)
示例#3
0
 def test_cancelButton(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         logOut = Userprofilemenu()
         browser.implicitly_wait(10)
         LauncheTender.subcontractorValidlogin(browser)
         orgInstance = Organizationclass()
         orgInstance.OpenaddUser(browser)
         time.sleep(2)
         if (orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source):
             orgInstance.RemoveUserOrganization(browser)
         orgInstance.AddUserOrganizationCancel(browser)
         time.sleep(2)
         orgInstance.OpenUserRole(browser)
         time.sleep(2)
         orgInstance.OpenaddUser(browser)
         time.sleep(2)
         self.assertFalse(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source)
         logs.info("Test Case No : 100103 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100103 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100103 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#4
0
 def test_Profilelocation(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         logOut=Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser= LauncheTender.subcontractorValidlogin(browser)
         orgInstance=Organizationclass()
         orgInstance.OpenProfilePage(browser)
         time.sleep(2)
         textvalue=orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','locationtext')
         time.sleep(2)
         savebutton=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','saveinprofile'))
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','locationprofile')).send_keys(textvalue)
         p=browser.find_elements_by_css_selector(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','locationLink'))
         p[0].click()
         time.sleep(2)
         self.assertEqual(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','addresstextbox')).get_attribute('value'),orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','addresstext'))
         time.sleep(2)
         browser.execute_script("arguments[0].scrollIntoView(true);", savebutton)
         savebutton.click()
         orgInstance.OpenaddUser(browser)
         orgInstance.OpenProfilePage(browser)
         time.sleep(2)
         self.assertEqual(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','addresstextbox')).get_attribute('value'),orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','addresstext'))
         logs.info("Test Case No : 100098 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100098 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100098 failed")
     finally:
         browser=logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#5
0
 def test_UserProfileSave(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser= LauncheTender.subcontractorValidlogin(browser)
         orgInstance=Organizationclass()
         logOut=Userprofilemenu()
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(3)
         textvalue=orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','nametextprofile')
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).clear()
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).send_keys(textvalue)
         sbutton=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','savebutton'))
         browser.execute_script("arguments[0].scrollIntoView(true);", sbutton)
         time.sleep(2)
         sbutton.click()
         orgInstance.OpenaddUser(browser)
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(2)
         self.assertEquals(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).get_attribute('value'),textvalue)
         logs.info("Test Case No : 100160 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100160 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100160 failed")
     finally:
         browser=logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
 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_removeUsertoOrg(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         browser.implicitly_wait(10)
         orgInstance = Organizationclass()
         logOut = Userprofilemenu()
         orgInstance.OpenaddUser(browser)
         browser.implicitly_wait(10)
         browser = orgInstance.AddUserOrganization(browser)
         time.sleep(3)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'saveButon')).click()
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source)
         orgInstance.RemoveUserOrganization(browser)
         self.assertFalse(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source)
         time.sleep(2)
         logs.info("Test Case No : 100105 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100111 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100105 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#8
0
 def test_Cancelfunction(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(10)
         LauncheTender = LauncheTenderclass()
         TenderAction=TenderClass()
         logOut=Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin(browser)
         time.sleep(3)
         ProjName=TenderAction.ProjectCreation(browser)
         TenderAction.OpenProject(ProjName,browser)
         NewTender=TenderAction.TenderCreation(browser)
         time.sleep(3)
         TenderAction.OpenTenderPlan(browser)
         time.sleep(3)
         sbutton=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','CancelButton'))
         browser.execute_script("arguments[0].style.visibility = 'visible';",sbutton)
         time.sleep(2)
         sbutton.click()
         self.assertFalse(orgLink.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','PopupTitle') in browser.page_source)
         logs.info("Test Case No : 100255 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100255 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100255 failed")
     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_userSelectionverification(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(10)
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         orgInstance = Organizationclass()
         logOut = Userprofilemenu()
         orgInstance.OpenUserRole(browser)
         time.sleep(3)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'managerole')).click()
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'warninginRole') in browser.page_source)
         time.sleep(3)
         logs.info("Test Case No : 100118 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100118 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100118 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#11
0
 def test_ProjectInOrg(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         logOut = Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         projectInstance = Projectclass()
         time.sleep(3)
         projectInstance.Openorganization(browser)
         orglink = orgLink.readfromXML(folder_path + '\Data\Data.xml',
                                       'eTender', 'Orgselection')
         Projectlink = orgLink.readfromXML(folder_path + '\Data\Data.xml',
                                           'eTender', 'ProjectSelection')
         browser.find_element_by_link_text(orglink).click()
         browser.find_element_by_link_text(Projectlink).click()
         time.sleep(2)
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'ProjectSelection') in browser.page_source)
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'TradeList') in browser.page_source)
         logs.info("Test Case No : 100162 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100162 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100162 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#12
0
 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)
示例#13
0
 def test_LogouteTender(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         time.sleep(3)
         Userprofilemenu_logout = Userprofilemenu()
         browser = Userprofilemenu_logout.logout_eTender(browser)
         time.sleep(3)
         eTlogout = DataDriver()
         logout_path = eTlogout.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'submitButton')
         time.sleep(1)
         Logout = browser.find_element_by_id(logout_path)  #Login button
         Logout1 = Logout.text
         time.sleep(1)
         self.assertEqual(Logout1, 'Log In')
         logs.info("Test Case No : 100041 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100041 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100041 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#14
0
    def test_AddUsernotification(self):
        try:
            browserInstance = setupValue()
            adminfunction = Adminclass()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            LauncheTender1 = LauncheTenderclass()
            logOut = Userprofilemenu()
            browser = LauncheTender1.openURL(browser)
            browser = LauncheTender1.estimatorValidlogin(browser)
            orgInstance = Organizationclass()
            orgInstance.OpenaddUser(browser)
            browser = orgInstance.AddUserOrganization(browser)
            browser.find_element_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'saveButon')).click()
            adminfunction = Adminclass()
            adminfunction.OpenNotificationRecipients(browser)
            time.sleep(3)
            p = browser.find_elements_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'emailrolebox'))
            time.sleep(2)
            p[1].send_keys(
                orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                    'userSaveEmail'))
            browser.find_element_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'adduserCheckbox')).click()
            browser.find_element_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'saveButon')).click()
            time.sleep(2)
            adminfunction.OpenTags(browser)
            adminfunction.OpenNotificationRecipients(browser)
            p = browser.find_elements_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'emailrolebox'))
            p[1].send_keys(
                orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                    'userSaveEmail'))
            time.sleep(2)
            self.assertTrue(
                browser.find_element_by_xpath(
                    orgLink.readfromXML(
                        folder_path + '\Object\AdminEstimator.xml', 'eTender',
                        'Usercheckbox')))

        except Exception:
            logs.error("Validation with Test Case No: 100170 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100170 failed")
            browser.implicitly_wait(5)
        finally:
            browser = logOut.logout_eTender(browser)
            LauncheTender1.closebrowser(browser)
示例#15
0
 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)
示例#16
0
 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)
示例#18
0
 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)
示例#19
0
 def test_clearmessageineditor(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         time.sleep(1)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser.implicitly_wait(5)
         time.sleep(1)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         #browser = LauncheTender1.list_Organisation(browser)
         time.sleep(1)
         browser = LauncheTender1.verifyorganisationdetails(browser)
         browser = LauncheTender1.list_project(browser)
         tenderDetails = Tenderdetails()
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         time.sleep(1)
         browser = tenderDetails.Actionslist(browser)
         time.sleep(1)
         browser = tenderDetails.editmessageinEditor(browser)
         time.sleep(1)
         browser = tenderDetails.clearmessageineditor(browser)
         time.sleep(1)
         nomessage = DataDriver()
         nomessage_path = nomessage.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'notesinsendmessage')
         nomessage_ineditor = browser.find_element_by_xpath(nomessage_path)
         nomessage_ineditor1 = nomessage_ineditor.text
         self.assertEqual(nomessage_ineditor1, '')
         time.sleep(1)
         browser = tenderDetails.backtotenderdetailswindow(browser)
         time.sleep(1)
         Userprofilemenu_logout = Userprofilemenu()
         browser = Userprofilemenu_logout.logout_eTender(browser)
         time.sleep(1)
         logs.info("Test Case No : 100026 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100026 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100026 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#20
0
    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)
示例#21
0
 def test_tagdeletion(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin(browser)
         orgInstance = Organizationclass()
         adminfunction.OpenTags(browser)
         logOut = Userprofilemenu()
         fake = Factory.create()
         fakevalue = fake.name()
         tagString = str(fakevalue)
         adminfunction.TagCreation(browser, tagString)
         time.sleep(3)
         adminfunction.TagDeletion(browser, tagString)
         time.sleep(2)
         message = str('Tag ' + tagString + ' has been deleted')
         self.assertTrue(message in browser.page_source)
         time.sleep(2)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender', 'TagNewSearchBox')).clear()
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender',
                                 'TagNewSearchBox')).send_keys(tagString)
         try:
             browser.find_element_by_xpath(
                 browser.find_element_by_xpath(
                     orgLink.readfromXML(
                         folder_path + '\Object\AdminEstimator.xml',
                         'eTender', 'TagValue')))
         except NoSuchElementException:
             logs.info("Test Case No : 100122 Passed Successfully")
             return True
         return False
     except Exception:
         logs.error("Validation with Test Case No: 100122 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100122 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#22
0
 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)
示例#24
0
 def test_TaskSchedulerReset(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         logOut = Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin(browser)
         adminfunction.OpenTaskScheduler(browser)
         time.sleep(4)
         p = browser.find_elements_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender', 'DueDateReminder'))
         DueValue = p[0].get_attribute('value')
         DueNewvalue = int(DueValue) + 1
         p[0].clear()
         p[0].send_keys(DueNewvalue)
         Acceptreminder = p[1].get_attribute('value')
         Acceptnewreminder = int(Acceptreminder) + 1
         p[1].clear()
         p[1].send_keys(Acceptnewreminder)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender', 'ResetButton')).click()
         time.sleep(4)
         p1New = browser.find_elements_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender', 'TenderReminder'))
         DueValueLatest = p1New[0].get_attribute('value')
         AcceptLatest = p1New[1].get_attribute('value')
         self.assertNotEquals(int(DueValueLatest), DueNewvalue)
         self.assertNotEquals(int(AcceptLatest), Acceptnewreminder)
     except Exception:
         logs.error("Validation with Test Case No: 100180 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100180 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#25
0
 def test_PreviewFunction(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(10)
         LauncheTender = LauncheTenderclass()
         TenderAction = TenderClass()
         logOut = Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin(browser)
         time.sleep(3)
         ProjName = TenderAction.ProjectCreation(browser)
         TenderAction.OpenProject(ProjName, browser)
         NewTender = TenderAction.TenderCreation(browser)
         time.sleep(3)
         TenderAction.OpenTenderPlan(browser)
         time.sleep(3)
         p = browser.find_elements_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\TenderPage.xml',
                                 'eTender', 'PlanTemplateSearch'))
         time.sleep(2)
         p[1].send_keys(
             orgLink.readfromXML(folder_path + '\Data\TenderData.xml',
                                 'eTender', 'TemplateData'))
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\TenderPage.xml',
                                 'eTender', 'PreviewPlan')).click()
         time.sleep(2)
         self.assertTrue(
             orgLink.readfromXML(folder_path +
                                 '\Data\TenderData.xml', 'eTender',
                                 'StageData') in browser.page_source)
         browser.find_element_by_tag_name('body').send_keys(Keys.ESCAPE)
         logs.info("Test Case No : 100256 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100256 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100256 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
示例#26
0
 def test_newtagcreation(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         logOut = Userprofilemenu()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.estimatorValidlogin(browser)
         orgInstance = Organizationclass()
         adminfunction.OpenTags(browser)
         fake = Factory.create()
         fakevalue = fake.name()
         tagString = str(fakevalue)
         adminfunction.TagCreation(browser, tagString)
         time.sleep(2)
         message = str('Tag ' + tagString + ' has been created')
         self.assertTrue(message in browser.page_source)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender',
                                 'TagSearchBox')).send_keys(tagString)
         time.sleep(2)
         self.assertEquals(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\Object\AdminEstimator.xml', 'eTender',
                     'TagValue')).get_attribute('innerHTML'), tagString)
     except Exception:
         logs.error("Validation with Test Case No: 100177 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100177 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender1.closebrowser(browser)
示例#27
0
 def test_TenderSearchfunction(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(10)
         LauncheTender = LauncheTenderclass()
         TenderAction = TenderClass()
         logOut = Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin(browser)
         time.sleep(3)
         ProjName = TenderAction.ProjectCreation(browser)
         TenderAction.OpenProject(ProjName, browser)
         NewTender = TenderAction.TenderCreation(browser)
         FalseNewTender = NewTender + "New"
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\TenderPage.xml',
                                 'eTender',
                                 'TenderSearchBox')).send_keys(NewTender)
         self.assertTrue(NewTender in browser.page_source)
         time.sleep(2)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\TenderPage.xml',
                                 'eTender', 'TenderSearchBox')).clear()
         browser.find_element_by_xpath(
             orgLink.readfromXML(
                 folder_path + '\Object\TenderPage.xml', 'eTender',
                 'TenderSearchBox')).send_keys(FalseNewTender)
         self.assertFalse(FalseNewTender in browser.page_source)
         logs.info("Test Case No : 100242 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100242 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100242 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
 def test_MinimumUsernotification(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         logOut = Userprofilemenu()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.estimatorValidlogin(browser)
         adminfunction = Adminclass()
         adminfunction.OpenNotificationRecipients(browser)
         time.sleep(3)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'adduserCheckbox')).click()
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'checkboxSelectedAll')).click()
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'saveButon')).click()
         time.sleep(2)
         self.assertTrue(
             orgLink.readfromXML(
                 folder_path + '\Data\AdminEstimatorData.xml', 'eTender',
                 'NotificationMessage') in browser.page_source)
         logs.info("Test Case No : 100171 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100171 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100171 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender1.closebrowser(browser)
示例#29
0
 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)
示例#30
0
 def test_estimatorshowvalue(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         time.sleep(1)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser.implicitly_wait(5)
         time.sleep(1)
         tenderDetails = Tenderdetails()
         time.sleep(1)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         browser = LauncheTender1.list_Organisation(browser)
         browser = LauncheTender1.verifyorganisationdetails(browser)
         browser = LauncheTender1.list_project(browser)
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         browser = tenderDetails.tenderItemslist(browser)
         time.sleep(1)
         tenderDetails_submit = SubmitTenderclass()
         time.sleep(1)
         browser = tenderDetails_submit.submitTender(browser)
         time.sleep(1)
         browser = tenderDetails_submit.confirmTendersubmission(browser)
         time.sleep(1)
         ##            browser = tenderDetails_submit.priceunrateditems(browser)
         ##            time.sleep(1)
         ##            browser = tenderDetails_submit.applypriceunrateditems(browser)
         ##            time.sleep(1)
         Userprofilemenu_logout = Userprofilemenu()
         time.sleep(1)
         browser = Userprofilemenu_logout.logout_eTender(browser)
         time.sleep(4)
         browser = LauncheTender1.estimatorValidlogin(browser)
         time.sleep(4)
         browser = tenderDetails.estimatorProject(browser)
         time.sleep(1)
         browser = tenderDetails.estimatortender(browser)
         time.sleep(1)
         browser = tenderDetails.estimatorshowvalue(browser)
         time.sleep(2)
         showvalue_XML = DataDriver()
         showvalue = []
         showvalue_path = showvalue_XML.readfromXML(
             folder_path + '\Object\Estimatorvalue.xml', 'eTender',
             'Values')
         time.sleep(1)
         showvalue = browser.find_elements_by_xpath(
             showvalue_path)  #Webelement for values
         time.sleep(3)
         showvalue1 = showvalue[4].text
         showvalue2 = showvalue[5].text
         showvalue3 = showvalue[6].text
         time.sleep(3)
         self.assertEqual(showvalue1, '3.10')
         self.assertEqual(showvalue2, '6.20')
         self.assertEqual(showvalue3, '9.30')
         logs.info("Test Case No : 100055 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100055 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100055 failed")
         browser.implicitly_wait(5)
     finally:
         reopenTender = ReopentenderusingRESTAPIclass()
         time.sleep(1)
         accesstoken = reopenTender.AuthunticateAPI()
         time.sleep(1)
         reopenTender.ReopentenderusingRESTAPI(accesstoken)
         time.sleep(1)
         LauncheTender1.closebrowser(browser)