Пример #1
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)
Пример #2
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_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)
Пример #4
0
    def test_RFxsupplieransweruploadfiles(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_elements_by_xpath(
                RFxEstimatorQuestion_path)
            time.sleep(1)

            self.assertEqual(RFxEstimatorQuestion[0].text,
                             '1. Have you ISO Certified?')
            self.assertEqual(RFxEstimatorQuestion[1].text,
                             '2. Do you have template format?')
            self.assertEqual(RFxEstimatorQuestion[2].text,
                             '3. Are you Big contractor or Small?')
            self.assertEqual(RFxEstimatorQuestion[3].text,
                             '4. Upload relevent files')

            RFxmultipleoptions_path = RFxAnswerstab1.readfromXML(
                folder_path + '\Object\RFx.xml', 'eTender',
                'radiobuttonoptions')
            RFxmultipleoptions = browser.find_elements_by_xpath(
                RFxmultipleoptions_path)
            time.sleep(1)

            ##            self.assertEqual(RFxmultipleoptions[0].text,'Yes')
            ##            self.assertEqual(RFxmultipleoptions[1].text,'No')
            ##
            ##            self.assertEqual(RFxmultipleoptions[2].text,'No')
            ##            self.assertEqual(RFxmultipleoptions[3].text,'Yes')

            #browser = RFxAnswers.uploadFile(browser)
            #time.sleep(2)

            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)
    def test_confirmdeclinetender(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.verifyorganisationdetails(browser)
            browser = LauncheTender1.list_project(browser)
            time.sleep(1)
            tenderDetails = Tenderdetails()
            browser = tenderDetails.Subcontratorproject(browser)
            time.sleep(1)
            browser = tenderDetails.suppliertender(browser)
            tenderDetails_decline = SubmitTenderclass()
            browser.implicitly_wait(5)
            time.sleep(1)
            browser = tenderDetails_decline.declineTender(browser)
            browser = tenderDetails_decline.declineTenderSubmission(browser)
            browser.implicitly_wait(5)
            time.sleep(1)
            confirmdecline = DataDriver()
            confirmdecline_path = confirmdecline.readfromXML(
                folder_path + '\Object\Object.xml', 'eTender',
                'confirmdeclinesubmission')
            time.sleep(1)
            tenderdeclined_notification = browser.find_element_by_xpath(
                confirmdecline_path)  #xpath for tender declined notification
            time.sleep(2)

            if tenderdeclined_notification.is_displayed():
                print("pass")
            else:
                print("fail")

            logs.info("Test Case No : 100037 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100037 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100037 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)
Пример #6
0
 def test_ColumnsinTradeList(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)
         tenderDetails = Tenderdetails()
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.verifyColumnsinTradeList(browser)
         time.sleep(1)
         columns_XML = DataDriver()
         columns_path = columns_XML.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'tradecolumns')
         trade_columns = []
         time.sleep(1)
         trade_columns = browser.find_elements_by_xpath(columns_path)
         time.sleep(1)
         browser.implicitly_wait(5)
         tradecolumn1 = trade_columns[0].text
         tradecolumn2 = trade_columns[1].text
         tradecolumn3 = trade_columns[2].text
         time.sleep(1)
         tradecolumn4 = trade_columns[3].text
         ##            tradecolumn5 = trade_columns[4].text
         ##            tradecolumn6 = trade_columns[5].text
         ##            time.sleep(1)
         ##            tradecolumn7 = trade_columns[6].text
         self.assertEqual(tradecolumn1, 'DOMESTIC')
         #self.assertEqual(tradecolumn2,'Received date:May 14, 2018')
         time.sleep(1)
         #self.assertEqual(tradecolumn3,'Due date:Jul 25, 2018')
         self.assertEqual(tradecolumn4, 'Responded date:')
         time.sleep(1)
         ##            self.assertEqual(tradecolumn5,'Received date')
         ##            self.assertEqual(tradecolumn6,'Due date')
         ##            time.sleep(1)
         ##            self.assertEqual(tradecolumn7,'Document')
         logs.info("Test Case No : 100008 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100008 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100008 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #7
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)
    def test_invitecolleaguesearch(self):
        try:
            browserInstance = setupValue()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            time.sleep(1)
            LauncheTender1 = LauncheTenderclass()
            browser = LauncheTender1.openURL(browser)
            browser = LauncheTender1.subcontractorValidlogin(browser)
            time.sleep(1)
            browser = LauncheTender1.list_project(browser)
            tenderDetails = Tenderdetails()
            time.sleep(1)
            browser = tenderDetails.Subcontratorproject(browser)
            browser = tenderDetails.suppliertender(browser)
            itemDetails_actions = ItemDetails()
            time.sleep(1)
            browser = itemDetails_actions.moreactions(browser)
            time.sleep(1)
            browser = itemDetails_actions.invitecolleague(browser)
            time.sleep(1)

            browser = itemDetails_actions.invitecolleagueSearch(browser)
            time.sleep(2)
            emailSearch1 = DataDriver()
            emailSearch = []
            emailSearch_path = emailSearch1.readfromXML(
                folder_path + '\Object\Itemsobject.xml', 'eTender',
                'searchemail')
            time.sleep(1)
            emailSearch = browser.find_elements_by_xpath(
                emailSearch_path)  #Verifying search results
            self.assertEqual(emailSearch[0].text, '*****@*****.**')
            #if len(emailSearch) == 1 and (self.assertEqual(emailSearch[0].text,'*****@*****.**')):
            if len(emailSearch) == 1:
                print("pass")
            else:
                self.fail("Validation with Test Case No: TC1033 failed")
            logs.info("Test Case No : TC1033 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: TC1033 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: TC1033 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
Пример #9
0
 def test_uploaddocment(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(2)
         browser = tenderDetails.uploadTendererdocument(browser)
         browser.implicitly_wait(5)
         time.sleep(1)
         uploaddoc = DataDriver()
         uploaddoc_path = uploaddoc.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'delete')  #Delete option exists after uploading docs
         time.sleep(1)
         upload_document = browser.find_element_by_xpath(
             uploaddoc_path)  #Delete option
         time.sleep(1)
         uploaddocument = upload_document.text
         self.assertEqual(uploaddocument, 'Delete')
         time.sleep(1)
         browser = tenderDetails.deletedocuments(browser)
         time.sleep(1)
         logs.info("Test Case No : 100030 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100030 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100030 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #10
0
 def test_deletingNotes(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)
         time.sleep(1)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         time.sleep(1)
         browser = tenderDetails.suppliertender(browser)
         time.sleep(4)
         browser = tenderDetails.deleteNotes(browser)
         time.sleep(1)
         browser.implicitly_wait(5)
         notesbubble = DataDriver()
         time.sleep(1)
         notesbubble_path = notesbubble.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'notesbubble')  #notesbubble
         time.sleep(1)
         notes_bubble = browser.find_element_by_xpath(
             notesbubble_path)  #Webelement for notesbubble
         if notes_bubble.is_displayed():
             print("PASS")
         else:
             print("FAIL")
         time.sleep(2)
         logs.info("Test Case No : 100096 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100096 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100096 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #11
0
 def test_submittender(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.subcontractorValidlogin(browser)
         time.sleep(1)
         browser = LauncheTender1.list_Organisation(browser)
         browser = LauncheTender1.verifyorganisationdetails(browser)
         time.sleep(1)
         browser = LauncheTender1.list_project(browser)
         tenderDetails = Tenderdetails()
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         tenderDetails_submit = SubmitTenderclass()
         browser.implicitly_wait(5)
         time.sleep(1)
         browser = tenderDetails_submit.submitTender(browser)
         browser.implicitly_wait(5)
         time.sleep(1)
         confirmsubmit = DataDriver()
         confirmsubmit_path = confirmsubmit.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'confirmsubmit')
         time.sleep(1)
         confirmsubmit_element = browser.find_element_by_xpath(
             confirmsubmit_path
         )  #Verifying Webelement for Confirm Submit button
         if confirmsubmit_element.is_displayed():
             print("pass")
         else:
             print("fail")
         logs.info("Test Case No : 100034 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100034 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100034 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #12
0
 def test_dialogboxtoAddnote(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.hoverThemousefornoteButton(browser)
         time.sleep(1)
         browser = tenderDetails.dialogueBoxtoAddaNote(browser)
         time.sleep(2)
         dialogbox1 = DataDriver()
         dialogbox_path = dialogbox1.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'dialogbox')  #dialogbox
         time.sleep(1)
         add_noteswindow = browser.find_element_by_xpath(
             dialogbox_path)  #Webelement for dialogbox
         time.sleep(1)
         windowtitle = add_noteswindow.text
         time.sleep(1)
         self.assertEqual(windowtitle, 'Add a note')
         time.sleep(2)
         logs.info("Test Case No : 100023 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100023 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100023 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #13
0
 def test_invitecolleaguenotinthelist(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         time.sleep(1)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         time.sleep(1)
         browser = LauncheTender1.list_project(browser)
         tenderDetails = Tenderdetails()
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         itemDetails_actions = ItemDetails()
         time.sleep(1)
         browser = itemDetails_actions.moreactions(browser)
         time.sleep(1)
         browser = itemDetails_actions.invitecolleague(browser)
         time.sleep(1)
         browser = itemDetails_actions.invitecolleaguenotinthelist(browser)
         time.sleep(1)
         browser = itemDetails_actions.emailnotinthelist(browser)
         time.sleep(1)
         emailinvitemessage1 = DataDriver()
         emailinvitemessage_path = emailinvitemessage1.readfromXML(
             folder_path + '\Object\Itemsobject.xml', 'eTender',
             'invitationsent')
         time.sleep(1)
         emailinvitemessage = browser.find_element_by_xpath(
             emailinvitemessage_path
         )  #Verifying successful message after invite
         self.assertEqual(emailinvitemessage.text,
                          'Colleague invitation sent')
         logs.info("Test Case No : TC1032 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: TC1032 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: TC1032 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #14
0
 def test_verifycolleaguelist(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         time.sleep(1)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         time.sleep(1)
         orgInstance=Organizationclass()
         orgInstance.OpenaddUser(browser)
         time.sleep(1)
         firstuser,seconduser = orgInstance.Userslist(browser)
         time.sleep(1)
         browser = LauncheTender1.list_Organisation(browser)
         time.sleep(1)
         browser = LauncheTender1.list_project(browser)
         tenderDetails = Tenderdetails()
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         itemDetails_actions = ItemDetails()
         time.sleep(1)
         browser = itemDetails_actions.moreactions(browser)
         time.sleep(1)
         browser = itemDetails_actions.invitecolleague(browser)
         time.sleep(1)
         currentorgemails1 = DataDriver()
         currentorgemails = []
         currentorgemails_path = currentorgemails1.readfromXML(folder_path+'\Object\Itemsobject.xml','eTender','currentorgemails')
         time.sleep(1)
         currentorgemails = browser.find_elements_by_xpath(currentorgemails_path) #Verifying current organisaion emails
         self.assertEqual(firstuser, currentorgemails[0].text)
         self.assertEqual(seconduser,currentorgemails[1].text)
         logs.info("Test Case No : TC1031 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: TC1031 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: TC1031 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #15
0
 def test_Confirmsubmittender(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)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         tenderDetails_submit = SubmitTenderclass()
         browser.implicitly_wait(5)
         browser = tenderDetails_submit.submitTender(browser)
         browser = tenderDetails_submit.confirmTendersubmission(browser)
         browser.implicitly_wait(5)
         tendersubmit = DataDriver()
         tendersubmit_path = tendersubmit.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'tendersubmitted')
         tendersubmit_element = browser.find_element_by_xpath(
             tendersubmit_path)  #Verifying Webelement for Projectname
         if tendersubmit_element.is_displayed():
             print("pass")
         else:
             print("fail")
         reopentender = ReopentenderusingRESTAPIclass()
         accesstoken = reopentender.AuthunticateAPI()
         reopentender.ReopentenderusingRESTAPI(accesstoken)
         logs.info("Test Case No : 100035 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100035 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100035 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
 def test_viewdeleteditemsinsupplier(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)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         browser = tenderDetails.selectFilter(browser)
         time.sleep(1)
         browser = tenderDetails.selectdeleteditemsinsupplier(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 : 100331 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100331 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100331 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
 def test_tenderdetails(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)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         browser.implicitly_wait(5)
         tradelist = DataDriver()
         trades = []
         tradefirst_path = tradelist.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'quicktenders')
         trades = browser.find_elements_by_xpath(
             tradefirst_path)  #Trades list
         time.sleep(3)
         #tradesecond_path = tradelist.readfromXML(folder_path+'\Object\Object.xml','eTender','tradesecondsub')
         #tradesecond = browser.find_element_by_xpath(tradesecond_path) #Trades list
         #time.sleep(1)
         trade1 = trades[0].text
         trade2 = trades[1].text
         self.assertEqual(trade1, 'A - Preliminaries - A1303 - Te..')
         self.assertEqual(trade2, 'A - Preliminaries - A1304 - Ed..')
         logs.info("Test Case No : 100007 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100007 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100007 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #18
0
 def test_Warningwhennorates(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         browser = LauncheTender1.list_Organisation(browser)
         browser = LauncheTender1.verifyorganisationdetails(browser)
         browser = LauncheTender1.list_project(browser)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliersecondtender(browser)
         time.sleep(2)
         tenderDetails_submit = SubmitTenderclass()
         browser = tenderDetails_submit.submitTender(browser)
         time.sleep(1)
         warningmessage1 = DataDriver()
         warningmessage_path = warningmessage1.readfromXML(
             folder_path + '\Object\TenderPage.xml', 'eTender',
             'warningmessage')  #User friendly message to the user
         warningmessage = browser.find_element_by_xpath(warningmessage_path)
         time.sleep(1)
         self.assertEqual(
             warningmessage.text,
             'You must enter a value for the package, you can enter a total in the totals box at the bottom of the page.'
         )
         time.sleep(1)
         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)
Пример #19
0
 def test_Insertrates(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)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         browser = tenderDetails.tenderItemslist(browser)
         browser.implicitly_wait(5)
         rates = DataDriver()
         rates_path = rates.readfromXML(folder_path + '\Object\Object.xml',
                                        'eTender', 'values')  #rates
         time.sleep(1)
         Value1 = []
         Value1 = browser.find_elements_by_xpath(rates_path)
         time.sleep(1)
         Value2 = Value1[10].text
         self.assertEqual(Value2, '6.20')
         time.sleep(1)
         logs.info("Test Case No : 100016 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100016 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100016 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
 def test_TenderverificationONSupplierStatus(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()
         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)
         time.sleep(2)
         tenderverifySupplierstatus1 = DataDriver()
         tenderverifySupplierstatus_path = tenderverifySupplierstatus1.readfromXML(
             folder_path + '\Object\TenderPage.xml', 'eTender',
             'tenderverifySupplierstatus')
         time.sleep(1)
         tenderverifySupplierstatus = browser.find_element_by_xpath(
             tenderverifySupplierstatus_path)  #Webelement for values
         time.sleep(1)
         self.assertEqual(tenderverifySupplierstatus.text, 'Review pending')
         logs.info("Test Case No : 100358 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100358 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100358 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #21
0
 def test_suppliertender(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)
         tenderDetails = Tenderdetails()
         browser = tenderDetails.Subcontratorproject(browser)
         browser = tenderDetails.suppliertender(browser)
         browser.implicitly_wait(5)
         itemdescription = DataDriver()
         itemdescription_path = itemdescription.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'itemdescription')  #Item-descrition
         time.sleep(1)
         item_description = browser.find_element_by_xpath(
             itemdescription_path)  #Webelement for Item description
         time.sleep(1)
         itemdescription = item_description.text
         time.sleep(1)
         self.assertEqual(itemdescription, '1000 x 600 mm high1')
         logs.info("Test Case No : 100012 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100012 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100012 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
Пример #22
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)
    def test_currencyinprojectsupplierlogin(self):
        try:
            i = 10
            while i<11:
                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)
##                browser = LauncheTender1.switchOrganisation(browser)
##                time.sleep(2)
##                browser = LauncheTender1.selectsecondOrganisation(browser)
##                time.sleep(7)
                Updatedetails = updatedetails()
                browser = Updatedetails.updateproject(browser)
                rownum=(i)
                rows = sheet.row_values(rownum)

                projecttype = rows[5]

                time.sleep(1)
                browser = Updatedetails.projectdetailscurrencydollar(browser,projecttype) #Pass the values from excel
                time.sleep(1)
                browser = Updatedetails.saveprojectdetails(browser) #Save project

                time.sleep(2)

                Userprofilemenu_logout = Userprofilemenu()
                browser = Userprofilemenu_logout.logout_eTender(browser)
                time.sleep(3)

                browser = LauncheTender1.subcontractorValidlogin(browser)
                time.sleep(3)
                browser = LauncheTender1.list_project(browser)

                time.sleep(3)
                projectdetails = DataDriver()


                projectcurrency = []

                projectcurrency_path = projectdetails.readfromXML(folder_path+'\Object\Pairwiserupdateproject.xml','eTender','projectrefvaluedate')
                projectcurrency = browser.find_elements_by_xpath(projectcurrency_path)

                value = numbers.format_currency(300,'USD',locale='en')
                time.sleep(1)

                self.assertEqual(projectcurrency[1].text,'Value:'+value)

                browser = Userprofilemenu_logout.logout_eTender(browser)
                time.sleep(3)

                i = i + 1
                logs.info("Test Case No : 100225 Passed Successfully")
        except Exception:
                logs.error("Validation with Test Case No: 100225 failed")
                browser.save_screenshot(fullpath)
                traceback.print_exc(file=sys.stdout)
                self.fail("Test Case No: 100225 failed")
                browser.implicitly_wait(5)
        finally:
                LauncheTender1.closebrowser(browser)
Пример #24
0
    def test_declineStatusinEstiamtor(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.verifyorganisationdetails(browser)
            browser = LauncheTender1.list_project(browser)
            time.sleep(1)
            tenderDetails = Tenderdetails()
            browser = tenderDetails.Subcontratorproject(browser)
            browser = tenderDetails.suppliertender(browser)
            time.sleep(1)
            tenderDetails_decline = SubmitTenderclass()
            browser.implicitly_wait(5)
            time.sleep(1)
            browser = tenderDetails_decline.declineTender(browser)
            browser = tenderDetails_decline.declineTenderSubmission(browser)
            time.sleep(1)
            Userprofilemenu_logout = Userprofilemenu()
            browser = Userprofilemenu_logout.logout_eTender(browser)
            time.sleep(1)
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(1)
            browser = tenderDetails.estimatorProject(browser)
            time.sleep(1)
            browser = tenderDetails.estimatortender(browser)
            time.sleep(1)
            browser = tenderDetails.viewsupplierdetails(browser)
            time.sleep(1)
            browser = tenderDetails.tenderstatusinEstimator(browser)
            browser.implicitly_wait(5)

            declinestatus = DataDriver()
            #tenderstatus = []
            time.sleep(1)
            declinestatus_path = declinestatus.readfromXML(
                folder_path + '\Object\Object.xml', 'eTender',
                'tenderstatusfordecline')
            tenderstatus = browser.find_element_by_xpath(
                declinestatus_path)  #xpath for decline status in Estimator
            time.sleep(1)
            declinestatus = tenderstatus.text
            self.assertEqual(declinestatus, 'Declined')
            logs.info("Test Case No : 100119 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100119 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100119 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)
Пример #25
0
    def test_currencyintendersupplierlogin(self):
        try:
            i = 10
            while i<11:
                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)
##                browser = LauncheTender1.switchOrganisation(browser)
##                time.sleep(2)
##                browser = LauncheTender1.selectsecondOrganisation(browser)
##                time.sleep(7)
                Updatedetails = updatedetails()
                browser = Updatedetails.updateproject(browser)
                rownum=(i)
                rows = sheet.row_values(rownum)

                projecttype = rows[5]

                time.sleep(1)
                browser = Updatedetails.projectdetailscurrencydollar(browser,projecttype) #Pass the values from excel
                time.sleep(1)
                browser = Updatedetails.saveprojectdetails(browser) #Save project

                time.sleep(2)

                Userprofilemenu_logout = Userprofilemenu()
                browser = Userprofilemenu_logout.logout_eTender(browser)
                time.sleep(3)

                browser = LauncheTender1.subcontractorValidlogin(browser)
                time.sleep(3)
                browser = LauncheTender1.list_project(browser)

                time.sleep(3)
                tenderDetails = Tenderdetails()

                browser = tenderDetails.Subcontratorproject(browser)
                time.sleep(1)
                browser = tenderDetails.suppliertender(browser)
                Currencyfortender = DataDriver()


                currencyfortenderRate_path = Currencyfortender.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','currencyfortenderRate') #Validate currencyfortenderRate
                currencyfortenderRate = browser.find_element_by_xpath(currencyfortenderRate_path)
                self.assertEqual(currencyfortenderRate.text,'Rate ($)')
                time.sleep(1)

                currencyfortenderValue_path = Currencyfortender.readfromXML(folder_path+'\Object\TenderPage.xml','eTender','currencyfortenderValue') #Validate currencyfortenderValue
                currencyfortenderValue = browser.find_element_by_xpath(currencyfortenderValue_path)
                self.assertEqual(currencyfortenderValue.text,'Value ($)')
                time.sleep(1)

                browser = Userprofilemenu_logout.logout_eTender(browser)
                time.sleep(3)

                i = i + 1
                logs.info("Test Case No : 100225 Passed Successfully")
        except Exception:
                logs.error("Validation with Test Case No: 100225 failed")
                browser.save_screenshot(fullpath)
                traceback.print_exc(file=sys.stdout)
                self.fail("Test Case No: 100225 failed")
                browser.implicitly_wait(5)
        finally:
                LauncheTender1.closebrowser(browser)
Пример #26
0
 def test_viewdocument(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.tenderdocument(browser)
         time.sleep(2)
         browser = tenderDetails.uploadTendererdocument(browser)
         time.sleep(1)
         browser = tenderDetails.closedocumentwindow(browser)
         time.sleep(1)
         tenderDetails_submit = SubmitTenderclass()
         time.sleep(3)
         browser = tenderDetails_submit.submitTender(browser)
         time.sleep(1)
         browser = tenderDetails_submit.confirmTendersubmission(browser)
         time.sleep(1)
         Userprofilemenu_logout = Userprofilemenu()
         browser = Userprofilemenu_logout.logout_eTender(browser)
         time.sleep(1)
         browser = LauncheTender1.estimatorValidlogin(browser)
         time.sleep(1)
         browser = tenderDetails.estimatorProject(browser)
         time.sleep(1)
         browser = tenderDetails.viewsupplierdetails(browser)
         time.sleep(1)
         document_count = DataDriver()
         documentcount_path = document_count.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'documentcountEstimator'
         )  #Delete option exists after uploading docs
         time.sleep(1)
         document_count = browser.find_element_by_xpath(
             documentcount_path)  #Delete option
         time.sleep(1)
         documentcount = document_count.text
         self.assertEqual(documentcount, '2')
         time.sleep(1)
         browser = tenderDetails.opendocumentswindow(browser)
         time.sleep(1)
         document_count_view = DataDriver()
         document_count_viewlist = []
         documentcount__view_path = document_count_view.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'documentviewEstimator'
         )  #Delete option exists after uploading docs
         time.sleep(1)
         document_count_viewlist = browser.find_elements_by_xpath(
             documentcount__view_path)
         time.sleep(1)
         document_count_view1 = document_count_viewlist[0].text
         document_count_view2 = document_count_viewlist[1].text
         time.sleep(1)
         self.assertEqual(document_count_view1,
                          'donotdeletefromDesktop.xlsx')
         self.assertEqual(document_count_view2,
                          'donotdeletefromDesktop.xlsx')
         time.sleep(1)
         browser = tenderDetails.closedocumentwindow(browser)
         time.sleep(1)
         browser = Userprofilemenu_logout.logout_eTender(browser)
         time.sleep(1)
         reopenTender = ReopentenderusingRESTAPIclass()
         time.sleep(1)
         accesstoken = reopenTender.AuthunticateAPI()
         time.sleep(1)
         reopenTender.ReopentenderusingRESTAPI(accesstoken)
         time.sleep(1)
         browser = LauncheTender1.subcontractorValidlogin(browser)
         time.sleep(2)
         browser = LauncheTender1.list_Organisation(browser)
         time.sleep(1)
         browser = LauncheTender1.list_project(browser)
         time.sleep(1)
         browser = tenderDetails.Subcontratorproject(browser)
         time.sleep(1)
         browser = tenderDetails.suppliertender(browser)
         time.sleep(1)
         browser = tenderDetails.tenderdocument(browser)
         time.sleep(1)
         browser = tenderDetails.deletedocuments(browser)
         time.sleep(2)
         logs.info("Test Case No : 100057 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100057 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100057 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
    def test_TenderverificationOFF(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)
            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)
            Userprofilemenu_logout = Userprofilemenu()
            time.sleep(1)
            browser = Userprofilemenu_logout.logout_eTender(browser)
            time.sleep(2)
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(2)
            browser = tenderDetails.estimatorProject(browser)
            time.sleep(1)
            browser = tenderDetails.estimatortender(browser)
            time.sleep(1)
            tenderverifybutton1 = DataDriver()
            tenderverifybutton = []
            tenderverifybutton_path = tenderverifybutton1.readfromXML(
                folder_path + '\Object\TenderPage.xml', 'eTender',
                'tenderverifybutton')
            time.sleep(1)
            tenderverifybutton = browser.find_elements_by_xpath(
                tenderverifybutton_path)  #Webelement for values
            time.sleep(1)
            if len(tenderverifybutton) == 6:
                print("Tender verification button is not present")
            else:
                self.fail("Tender verification button is present")

            logs.info("Test Case No : 100357 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100357 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100357 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)
Пример #28
0
    def test_viewnewbillitems(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)
            tenderDetails = Tenderdetails()
            browser = tenderDetails.Subcontratorproject(browser)
            browser = tenderDetails.suppliertender(browser)
            browser = tenderDetails.selectFilter(browser)
            time.sleep(1)
            browser = tenderDetails.selectnewbillitems(browser)
            browser = tenderDetails.closefilter(browser)
            time.sleep(1)
            newbillitems_XML = DataDriver()
            newbillitems = []
            newbillitems_path = newbillitems_XML.readfromXML(
                folder_path + '\Object\Estimatorvalue.xml', 'eTender',
                'pricableitems')
            newbillitems = browser.find_elements_by_xpath(
                newbillitems_path)  #Webelement for values
            time.sleep(1)
            ##            newbillitems1 =  newbillitems[1].text
            ##            newbillitems2 =  newbillitems[4].text
            ##            newbillitems3 =  newbillitems[7].text
            time.sleep(1)

            env = newbillitems_XML.readfromXML(folder_path + '\Env\Setup.xml',
                                               'eTender', 'env')

            if env == 'StageURL':

                newbillitems1 = newbillitems[1].text
                newbillitems2 = newbillitems[4].text
                #newbillitems3 =  newbillitems[7].text

                self.assertEqual(newbillitems1, 'New Bill item')
                #self.assertEqual(newbillitems2,'65 mm thick; curved work')
                self.assertEqual(newbillitems2, '80 mm thick')
                logs.info("Test Case No : 100318 Passed Successfully")

            if env == 'PreStageURL':

                newbillitems1 = newbillitems[1].text
                newbillitems2 = newbillitems[4].text
                newbillitems3 = newbillitems[7].text

                self.assertEqual(newbillitems1, 'New Bill item')
                self.assertEqual(newbillitems2, '80 mm thick')
                self.assertEqual(newbillitems3, '65 mm thick; curved work')
                logs.info("Test Case No : 100318 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: 100318 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100318 failed")
            browser.implicitly_wait(5)
        finally:
            LauncheTender1.closebrowser(browser)
Пример #29
0
 def test_notesinEstimator(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.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)
         time.sleep(1)
         browser = tenderDetails.addingNotes(browser)
         enteredNotes = DataDriver()
         time.sleep(1)
         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
         click_notesbubble[4].click()
         time.sleep(2)
         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
         time.sleep(1)
         subcontractornotes = enterednotes.text
         addingnotes = DataDriver()
         savenotes_path = addingnotes.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'savenotes')
         Save_Notes = browser.find_element_by_xpath(
             savenotes_path)  #Save button
         time.sleep(1)
         Save_Notes.click()
         time.sleep(1)
         SubmitTender = SubmitTenderclass()
         browser = SubmitTender.submitTender(browser)
         time.sleep(1)
         browser = SubmitTender.confirmTendersubmission(browser)
         Userprofilemenu_logout = Userprofilemenu()
         time.sleep(1)
         browser = Userprofilemenu_logout.logout_eTender(browser)
         browser = LauncheTender1.estimatorValidlogin(browser)
         time.sleep(1)
         browser = tenderDetails.estimatorProject(browser)
         browser = tenderDetails.estimatortender(browser)
         time.sleep(3)
         browser = tenderDetails.notesinEstimator(browser)
         estimatornotes = DataDriver()
         time.sleep(1)
         notesinestimator_path = estimatornotes.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'NotesinEstimatorLogin')
         text_noteswindow_Estimatorlogin = browser.find_element_by_xpath(
             notesinestimator_path)  #Notes in Estimator Login
         time.sleep(1)
         time.sleep(1)
         estimatornotes1 = text_noteswindow_Estimatorlogin.text
         time.sleep(1)
         browser.implicitly_wait(5)
         if subcontractornotes == estimatornotes1:
             print("pass")
         else:
             print("fail")
         time.sleep(1)
         #estimatornotes1 = DataDriver()
         cancelwindow_path = estimatornotes.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'cancelwindow')
         cancel_notewindow = browser.find_element_by_xpath(
             cancelwindow_path)  # Click on cancel link
         time.sleep(1)
         cancel_notewindow.click()
         time.sleep(1)
         logs.info("Test Case No : 100058 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100058 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100058 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)