def test_estimatorproject(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            browser.implicitly_wait(5)
            browser = LauncheTender1.estimatorValidlogin(browser)
            tenderDetails = Tenderdetails()
            browser = tenderDetails.estimatorProject(browser)
            time.sleep(3)
            tradelist = DataDriver()

            tradelist1 = []

            tradelist1_path = tradelist.readfromXML(folder_path+'\Object\Object.xml','eTender','tenderdetailsestimator')
            tradelist1 = browser.find_elements_by_xpath(tradelist1_path) #Trades list
            time.sleep(1)

            #tradesecond_path = tradelist.readfromXML(folder_path+'\Object\Object.xml','eTender','tradesecondest')
            #tradesecond = browser.find_element_by_xpath(tradesecond_path) #Trades list
            time.sleep(1)
            self.assertEqual(tradelist1[2].text,'A - Preliminaries - A1303 - Te..')
            self.assertEqual(tradelist1[3].text,'A - Preliminaries - A1304 - Ed..')
            logs.info("Test Case No : 100046 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100046 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100046 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
示例#2
0
 def test_addingNotes(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(2)
         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.hoverThemousefornoteButton(browser)
         browser = tenderDetails.dialogueBoxtoAddaNote(browser)
         browser = tenderDetails.addingNotes(browser)
         time.sleep(3)
         enteredNotes = DataDriver()
         click_notesbubble = []
         clicknotesbubble_path = enteredNotes.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'clicknotesbubble')
         time.sleep(1)
         click_notesbubble = browser.find_elements_by_xpath(
             clicknotesbubble_path)  #Click on Notes bubble
         time.sleep(3)
         click_notesbubble[4].click()
         enterednotes_path = enteredNotes.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'addingnotes')  #adding notes
         time.sleep(1)
         enterednotes = browser.find_element_by_xpath(
             enterednotes_path)  #Webelement for entered notes
         actualnotes = enterednotes.text
         time.sleep(1)
         self.assertEqual(actualnotes, 'Notes 1')
         savenotes_path = enteredNotes.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'savenotes')
         Save_Notes = browser.find_element_by_xpath(
             savenotes_path)  #Save button
         Save_Notes.click()
         time.sleep(2)
         browser = tenderDetails.deleteNotes(browser)
         time.sleep(1)
         logs.info("Test Case No : 100024 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100024 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100024 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#3
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)
示例#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_Plantemplatestagnotesupdate(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            time.sleep(1)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            time.sleep(1)
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(1)
            tendertemplate = Tenderplans()
            tenderDetails = Tenderdetails()

            browser = tenderDetails.Subcontratorproject(browser)
            time.sleep(2)
            browser = tenderDetails.estimatortender2(browser)
            time.sleep(2)
            browser = tendertemplate.estimatortenderpalntender(
                browser)  #Go to Tender plan tender
            #time.sleep(1)
            #browser = tendertemplate.estimatortenderplan(browser) #Select Tenderplan from dropdown list
            time.sleep(5)
            browser = tendertemplate.notesforfirststag(
                browser)  #Click on Notes icon for Stag
            time.sleep(1)
            browser = tenderDetails.updatingNotes(browser)  # Updating notes
            time.sleep(1)
            browser = tendertemplate.notesforfirststag(
                browser)  #Click on Notes icon for Stag
            time.sleep(1)
            enteredNotes = DataDriver()

            enterednotes_path = enteredNotes.readfromXML(
                folder_path + '\Object\Object.xml', 'eTender',
                'addingnotes')  #adding notes
            time.sleep(1)
            enterednotes = browser.find_element_by_xpath(
                enterednotes_path)  #Webelement for entered notes

            actualnotes = enterednotes.text
            time.sleep(1)
            self.assertEqual(actualnotes, 'Update Notes 1')

            logs.info("Test Case No : 100284 Passed Successfully")
            time.sleep(1)

            browser = tendertemplate.notesforstagsave(browser)
            time.sleep(1)
            browser = tendertemplate.tenderplansave(browser)
            time.sleep(1)
        except Exception:
            logs.error("Validation with Test Case No: 100284 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100284 failed")
            browser.implicitly_wait(5)
        finally:

            LauncheTender1.closebrowser(browser)
示例#6
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_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)
 def test_viewdeleteditemsinestimator(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser.implicitly_wait(5)
         browser = LauncheTender1.estimatorValidlogin(browser)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.estimatorProject(browser)
         browser = tenderDetails.estimatortender(browser)
         browser = tenderDetails.selectFilter(browser)
         time.sleep(1)
         browser = tenderDetails.selectdeleteditemsinestimator(browser)
         browser = tenderDetails.closefilter(browser)
         time.sleep(1)
         deleteditems_XML = DataDriver()
         deleteditems = []
         deleteditems_path = deleteditems_XML.readfromXML(folder_path+'\Object\Estimatorvalue.xml','eTender','deleteitems')
         deleteditems = browser.find_elements_by_xpath(deleteditems_path) #Webelement for values
         time.sleep(1)
         deleteditems1 =  deleteditems[31].text
         time.sleep(1)
         self.assertEqual(deleteditems1,'Deleted item')
         logs.info("Test Case No : 100330 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100330 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100330 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#9
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_viewtenderdetailsinEstimator(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.estimatorValidlogin(browser)
         time.sleep(1)
         browser = tenderDetails.estimatorProject(browser)
         browser = tenderDetails.estimatortender(browser)
         time.sleep(1)
         itemdescription = DataDriver()
         itemdescription_path = itemdescription.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'itemdescription')  #Item-descrition
         item_description = browser.find_element_by_xpath(
             itemdescription_path)  #Webelement for Item description
         itemdescription = item_description.text
         self.assertEqual(itemdescription, '1000 x 600 mm high1')
         logs.info("Test Case No : 100052 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100052 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100052 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
    def test_RFxaddQuestionfileupload(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            time.sleep(1)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            time.sleep(1)
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(1)
            tenderDetails = Tenderdetails()
            time.sleep(1)
            browser = tenderDetails.Subcontratorproject(browser)
            time.sleep(2)
            browser = tenderDetails.estimatortender1(browser)
            time.sleep(2)

            RFxQuestions = RFxQuestionnaire()

            browser = RFxQuestions.RFxQuestionsTab(browser)
            time.sleep(2)

            browser = RFxQuestions.RFxAddQuestions(browser)
            time.sleep(2)

            browser = RFxQuestions.RFxFileupload(browser)
            time.sleep(2)

            browser = RFxQuestions.selectdropdown(browser)
            time.sleep(2)

            browser = RFxQuestions.selectFileupload(browser)
            time.sleep(2)

            browser = RFxQuestions.SaveRFxquestions(browser)
            time.sleep(2)

            RFxupload = DataDriver()
            time.sleep(1)
            disabledpathforuploadfile = browser.find_elements_by_xpath(
                RFxupload.readfromXML(folder_path + '\Object\RFx.xml',
                                      'eTender', 'disabled'))
            time.sleep(1)

            if disabledpathforuploadfile[3].is_displayed():
                print "Textbox for upload file is disabled after saving details"
            else:
                self.fail("Upload file Question not saved")

            logs.info("Test Case No : RFX Passed Successfully")
            time.sleep(1)
        except Exception:
            logs.error("Validation with Test Case No: RFX failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: RFX failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
示例#12
0
 def test_Projectlist(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser.implicitly_wait(5)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         browser = LauncheTender1.list_Organisation(browser)
         browser = LauncheTender1.verifyorganisationdetails(browser)
         browser = LauncheTender1.list_project(browser)
         browser.implicitly_wait(5)
         list_project = DataDriver()
         projectlist1 = list_project.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'projectlist')  #Project
         browser.implicitly_wait(5)
         project_list = browser.find_element_by_link_text(projectlist1)
         project_list1 = project_list.text
         self.assertEqual(project_list1, 'Test Project')
         logs.info("Test Case No : 100006 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100006 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100006 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
    def test_hintinSuperadminafterLogout(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            time.sleep(1)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            browser.implicitly_wait(5)
            browser = LauncheTender1.superAdminValidlogin(browser)
            Hintdisplay = HintInteract()
            browser = Hintdisplay.systemfiledsmenu(browser)
            time.sleep(1)

            hint = DataDriver()
            time.sleep(1)

            self.assertFalse('System1' in browser.page_source)
            self.assertFalse('System field Creation can be done here' in browser.page_source)
            self.assertFalse('Items1' in browser.page_source)
            self.assertFalse('Total items1' in browser.page_source)
            self.assertFalse('Done' in browser.page_source)
            time.sleep(1)

            logs.info("Test Case No : TC1508 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: TC1508 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: TC1508 failed")
            browser.implicitly_wait(5)
        finally:
            time.sleep(1)
            LauncheTender1.closebrowser(browser)
示例#14
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)
示例#15
0
    def test_currencyinprojectdetails(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.estimatorValidlogin(browser)
                time.sleep(1)
                Updatedetails = updatedetails()
                browser = Updatedetails.createproject(browser)
                time.sleep(2)

                currency_projectdetails = DataDriver()

                currencyprojectdetails_path =currency_projectdetails.readfromXML(folder_path+'\Object\Project.xml','eTender','projectcurrencylabel')
                currencyprojectdetails=browser.find_element_by_xpath(currencyprojectdetails_path)
                self.assertEqual(currencyprojectdetails.text,'Project currency')

                time.sleep(2)

                logs.info("Test Case No : 100218 Passed Successfully")

        except Exception:
                logs.error("Validation with Test Case No: 100218 failed")
                browser.save_screenshot(fullpath)
                traceback.print_exc(file=sys.stdout)
                self.fail("Test Case No: 100218 failed")
                browser.implicitly_wait(5)
        finally:
                LauncheTender1.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_documentlinkfileURL(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.estimatorValidlogin(browser)
         time.sleep(4)
         browser = tenderDetails.projectdocIcon(browser)
         time.sleep(1)
         self.assertTrue(
             'http://bg-etender-fs:8080/fileserver/api/file/raw/5a7445cd0ee3c5610bdcde35'
             in browser.page_source)
         logs.info("Test Case No : TC1026 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: TC1026 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: TC1026 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#18
0
    def test_TendercreationBalconiesMaterial(self):
        try:
            i = 12
            while i<13:
                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.estimatorValidlogin(browser)
                time.sleep(1)
                tenderDetails = Tenderdetails()

                browser = tenderDetails.Subcontratorproject(browser)
                time.sleep(2)

                tenderclass = TenderClass()

                rownum=(i)
                rows = sheet.row_values(rownum)

                tendername = rows[1]
                tenderreference = rows[2]
                tenderdescription = rows[3]
                tendertype = rows[4]

                time.sleep(1)
                browser = tenderclass.TenderCreation(browser,tendername,tenderreference,tenderdescription,tendertype) #Pass the values from excel

                time.sleep(2)
                todaysdate = datetime.datetime.today().strftime('%d-%m-%Y')

                tendercreation = DataDriver()
                tenderstatus = []

                tenderstatus_path = tendercreation.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','tenderstatus') #Validate tender status
                tenderstatus = browser.find_elements_by_xpath(tenderstatus_path)

                self.assertEqual(tenderstatus[4].text,'Active')
                #self.assertEqual(tendertype,'MATERIAL')
                #self.assertEqual(tenderstatus[30].text,todaysdate)

                tendername_path = tendercreation.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','tenderName') #Validate tender name
                tendername = browser.find_elements_by_xpath(tendername_path)

                #self.assertEqual(tendername[9].text,'Balconies2')

                time.sleep(3)
                i = i + 1
        except Exception:
                logs.error("Validation with Test Case No: 100373 failed")
                browser.save_screenshot(fullpath)
                traceback.print_exc(file=sys.stdout)
                self.fail("Test Case No: 100373")
                browser.implicitly_wait(5)
        finally:
                LauncheTender1.closebrowser(browser)
示例#19
0
    def test_addhyperlinkdisplayed(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.estimatorValidlogin(browser)
            time.sleep(4)
            browser = tenderDetails.projectdocIcon(browser)
            time.sleep(1)

            hyperlink1 = DataDriver()
            time.sleep(1)
            hyperlinkdisplayed_path = hyperlink1.readfromXML(
                folder_path + '\Object\Project.xml', 'eTender', 'hyperlink')
            hyperlinkdisplayed = browser.find_element_by_xpath(
                hyperlinkdisplayed_path)  #Xpath for hover
            time.sleep(2)
            self.assertEqual(hyperlinkdisplayed.text, 'Add hyperlink')
            logs.info("Test Case No : TC1039 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: TC1039 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: TC1039 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
    def test_RFxsupplierquestionstabClick(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            browser = LauncheTender1.subcontractorValidlogin(browser)
            browser = LauncheTender1.list_project(browser)
            tenderDetails = Tenderdetails()
            browser = tenderDetails.Subcontratorproject(browser)
            browser = tenderDetails.suppliersecondtender(browser)
            time.sleep(2)
            RFxAnswers = RFxQuestionnaire()

            browser = RFxAnswers.RFxQuestionsTabinsupplier(browser)
            time.sleep(2)

            RFxAnswerstab1 = DataDriver()
            time.sleep(1)
            RFxEstimatorQuestion_path = RFxAnswerstab1.readfromXML(folder_path+'\Object\RFx.xml','eTender','rfxanswer1')
            RFxEstimatorQuestion = browser.find_element_by_xpath(RFxEstimatorQuestion_path)
            time.sleep(1)

            self.assertEqual(RFxEstimatorQuestion.text,'1. Have you ISO Certified?')

            logs.info("Test Case No : 100291 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100291 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100291 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
示例#21
0
    def test_TendercreationBalustradingDuplicate(self):
        try:
            i = 9
            while i < 10:
                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.estimatorValidlogin(browser)
                time.sleep(1)
                tenderDetails = Tenderdetails()

                browser = tenderDetails.Subcontratorproject(browser)
                time.sleep(2)

                tenderclass = TenderClass()

                rownum = (i)
                rows = sheet.row_values(rownum)

                tendername = rows[1]
                tenderreference = rows[2]
                tenderdescription = rows[3]
                tendertype = rows[4]

                time.sleep(1)
                browser = tenderclass.TenderCreation(
                    browser, tendername, tenderreference, tenderdescription,
                    tendertype)  #Pass the values from excel

                tendercreation = DataDriver()

                duplicatetender_path = tendercreation.readfromXML(
                    folder_path + '\Object\TenderPage.xml', 'eTender',
                    'duplicatetender')  #Validate tender duplication
                duplicatetender = browser.find_element_by_xpath(
                    duplicatetender_path)

                self.assertEqual(duplicatetender.text,
                                 'Duplicate tender in the project.')

                time.sleep(3)
                i = i + 1
                time.sleep(2)
                browser = tenderclass.Backtotradelist(browser)
                time.sleep(1)
                browser = tenderclass.TenderDeletion(browser)
                time.sleep(1)
        except Exception:
            logs.error("Validation with Test Case No: 100380 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100380")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.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)
示例#24
0
 def test_EstimatorlogineTender(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.estimatorValidlogin(browser)
         time.sleep(4)
         ##            browser = LauncheTender1.switchOrganisation(browser)
         ##            time.sleep(1)
         ##            browser = LauncheTender1.selectsecondOrganisation(browser)
         ##            time.sleep(7)
         estimator_login = DataDriver()
         projectlist1 = estimator_login.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'projectlist')  #Project
         time.sleep(3)
         project_list = browser.find_element_by_link_text(projectlist1)
         time.sleep(3)
         project_list1 = project_list.text
         self.assertEqual(project_list1, 'Test Project')
         time.sleep(2)
         logs.info("Test Case No : 100045 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100045 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100045 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#25
0
 def test_Userprofileinestimator(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         time.sleep(1)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         time.sleep(1)
         browser = LauncheTender1.estimatorValidlogin(browser)
         time.sleep(1)
         userprofile = UserProfileinfo()
         browser = userprofile.userprofilelink(browser)
         time.sleep(1)
         userprofileheading = DataDriver()
         time.sleep(1)
         userprofileheading_path = userprofileheading.readfromXML(folder_path+'\Object\SwitchOrganisation.xml','eTender','userprofileheading')
         userprofileheading = browser.find_element_by_xpath(userprofileheading_path) #userprofileheading in Estimator Login
         time.sleep(1)
         userprofileheading1 = userprofileheading.text
         time.sleep(1)
         browser.implicitly_wait(5)
         self.assertEqual(userprofileheading1,'Your eTender profile information')
         time.sleep(1)
         logs.info("Test Case No : 100189 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100189 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100189 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#26
0
    def test_tenderquickaccess(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            browser.implicitly_wait(5)
            browser = LauncheTender1.subcontractorValidlogin(browser)
            Quickaccess = Quicklyaccessingtendersclass()
            browser = Quickaccess.tenderQuickAccess(browser)
            tenderslist = []
            quicktenders = DataDriver()
            quicktenders_path = quicktenders.readfromXML(
                folder_path + '\Object\Object.xml', 'eTender', 'quicktenders')
            tenderslist = browser.find_elements_by_xpath(
                quicktenders_path)  #tenders list in Quick tender access
            time.sleep(1)

            firsttender = tenderslist[0].text
            secondtender = tenderslist[1].text
            self.assertEqual(firsttender,
                             'A - Preliminaries - A1303 - Temp Proppin')
            self.assertEqual(secondtender,
                             'A - Preliminaries - A1304 - Edge Protect')

            logs.info("Test Case No : 100010 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100010 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100010 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
 def test_internaldocumentlinkfileURL(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.estimatorValidlogin(browser)
         time.sleep(4)
         browser = tenderDetails.projectdocIcon(browser)
         time.sleep(1)
         self.assertTrue(
             'https://jira.causeway.com/secure/attachment/47719/JSON%20Object.txt'
             in browser.page_source)
         logs.info("Test Case No : TC1027 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: TC1027 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: TC1027 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#28
0
    def test_Tenderadditem(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            time.sleep(1)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            time.sleep(1)
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(5)
            tendertemplate = Tenderplans()
            tenderDetails = Tenderdetails()
            itemdetails = ItemDetails()

            browser = tenderDetails.Subcontratorproject(browser)
            time.sleep(2)
            tenderclass = TenderClass()

            browser = itemdetails.localtender(browser)  #Go to new tender
            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.additemclick(
                browser)  #click add items button
            time.sleep(1)

            browser = itemdetails.additem(
                browser)  #Enter item details to create new item
            time.sleep(1)

            browser = itemdetails.additemsave(browser)  #Save item details
            time.sleep(1)

            new_item = DataDriver()
            time.sleep(1)
            newitem_path = new_item.readfromXML(
                folder_path + '\Object\Itemsobject.xml', 'eTender',
                'itemsintender')
            newitem = browser.find_elements_by_xpath(newitem_path)
            time.sleep(1)
            self.assertEqual(newitem[1].text, '10 mm brick')
            self.assertEqual(newitem[4].text, 'General works')

            logs.info("Test Case No : 100311 Passed Successfully")
            time.sleep(1)

        except Exception:
            logs.error("Validation with Test Case No: 100311 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100311 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
 def test_SubcontractorlogineTender(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser.implicitly_wait(5)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         browser.implicitly_wait(5)
         time.sleep(1)
         subcontractor_login = DataDriver()
         organisation_text = subcontractor_login.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'organisation-text')  #organisation
         time.sleep(1)
         organisation = browser.find_element_by_link_text(organisation_text)
         #print organisation.text
         time.sleep(1)
         organisation1 = organisation.text
         time.sleep(1)
         self.assertEqual(organisation1, 'GSE Civil Engineering Ltd')
         logs.info("Test Case No : 100003 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100003 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100003 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
示例#30
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)