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)
Example #2
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)
Example #3
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)