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)
Пример #2
0
 def test_registersupplier(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         browser = LauncheTender1.openURL(browser)
         registration = RegistrationineT()
         browser = registration.register(browser)
         time.sleep(1)
         browser = registration.selectsupplierRole(browser)
         time.sleep(1)
         browser = registration.registrationForm(browser)
         time.sleep(1)
         browser = registration.organisationcreate(browser)
         time.sleep(1)
         browser = registration.supplierRegistration(browser)
         time.sleep(1)
         browser = LauncheTender1.superAdminValidlogin(browser)
         time.sleep(1)
         browser = registration.supplierAuthorisation(browser)
         time.sleep(1)
         emailvalidate = DataDriver()
         validateemail = []
         time.sleep(1)
         emailvalidate_path = emailvalidate.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender', 'emailvalidate')
         validateemail = browser.find_elements_by_xpath(emailvalidate_path)
         time.sleep(1)
         email = validateemail[1].text
         time.sleep(1)
         self.assertEqual(email, '*****@*****.**')
         time.sleep(1)
         browser = registration.supplierAccept(browser)
         time.sleep(1)
         browser = registration.supplierDeletion(browser)
         time.sleep(1)
         browser = registration.organisationmenu(browser)
         time.sleep(1)
         browser = registration.organisationsearchdelete(browser)
         time.sleep(1)
         ##            Delete = deleteorganisation()
         ##            browser = Delete.orgId(browser)
         ##            time.sleep(1)
         ##            browser = Delete.orguser(browser)
         ##            time.sleep(1)
         ##            browser = Delete.organisation(browser)
         ##            time.sleep(1)
         logs.info("Test Case No : 1000 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 1000 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 1000 failed")
         browser.implicitly_wait(5)
     finally:
         LauncheTender1.closebrowser(browser)
    def test_hintforpathvariable(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)
            time.sleep(1)
            Hintdisplay = HintInteract()
            browser = Hintdisplay.projectlistmenu(browser)
            time.sleep(1)

            browser = Hintdisplay.projectlistclick(browser)
            time.sleep(1)

            hint = DataDriver()
            time.sleep(1)
            hinttitle = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hinttitle'))  # validating hint title
            self.assertEqual(hinttitle.text, 'Tender')

            hintmoreinfo = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintmoreinfo'))  # validating hint info
            hintinfo = hintmoreinfo.get_attribute('title')
            self.assertEqual(hintinfo, 'More info')

            hintcontent = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintcontent'))  # validating hint content
            self.assertEqual(hintcontent.text,
                             'Tender Creation can be done here')

            hintdone = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintbutton'))  # validating hint done text
            self.assertEqual(hintdone.text, 'Done')
            logs.info("Test Case No : TC1050 Passed Successfully")

            browser = Hintdisplay.hintDone(browser)
        except Exception:
            logs.error("Validation with Test Case No: TC1533 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: TC1533 failed")
            browser.implicitly_wait(5)
        finally:
            time.sleep(1)
            LauncheTender1.closebrowser(browser)
    def test_hintWithoverlayinSuperadmin(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)
            time.sleep(1)
            Hintdisplay = HintInteract()
            browser = Hintdisplay.systemcurrencymenu(browser)
            time.sleep(1)

            #browser = Hintdisplay.showhints(browser)
            #time.sleep(2)

            overlay1 = DataDriver()
            overlay_path = overlay1.readfromXML(
                folder_path + '\Object\Hint.xml', 'eTender',
                'overlaybackground')
            overlay = browser.find_element_by_xpath(overlay_path)
            time.sleep(1)

            if overlay.is_displayed():
                print("Overlay background exists")
            else:
                self.fail("Overlay background color does not exists")

            logs.info("Test Case No : TC1073 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: TC1073 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: TC1073 failed")
            browser.implicitly_wait(5)
        finally:
            time.sleep(1)
            LauncheTender1.closebrowser(browser)
    def test_showhintAgaininSuperadmin(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)

            browser = Hintdisplay.showhints(browser)
            time.sleep(1)

            hint = DataDriver()
            time.sleep(1)
            hinttitle = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hinttitle'))  # validating hint title
            self.assertEqual(hinttitle.text, 'System1')

            hintcontent = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintcontent'))  # validating hint content
            self.assertEqual(hintcontent.text,
                             'System field Creation can be done here')

            hintdone = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintbutton'))  # validating hint done text
            self.assertEqual(hintdone.text, 'Next')

            browser = Hintdisplay.nexthint(browser)
            time.sleep(1)

            hinttitle = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hinttitle'))  # validating hint title
            self.assertEqual(hinttitle.text, 'Items1')

            hintcontent = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintcontent'))  # validating hint content
            self.assertEqual(hintcontent.text, 'Total items1')

            hintdone = browser.find_element_by_xpath(
                hint.readfromXML(folder_path + '\Object\Hint.xml', 'eTender',
                                 'hintbutton'))  # validating hint done text
            self.assertEqual(hintdone.text, 'Done')
            time.sleep(1)

            logs.info("Test Case No : TC1502 Passed Successfully")
        except Exception:
            logs.error("Validation with Test Case No: TC1502 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: TC1502 failed")
            browser.implicitly_wait(5)
        finally:
            time.sleep(1)
            LauncheTender1.closebrowser(browser)
Пример #6
0
    def test_UserprofileValidatedetailsinSuperadmin(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(2)
            userprofile = UserProfileinfo()
            browser = userprofile.userprofilelink(browser)
            time.sleep(1)
            browser = userprofile.UserProfilePageUpdate(browser)
            time.sleep(2)

            logoutEstimator = Userprofilemenu()
            browser = logoutEstimator.logout_eTender(browser)
            time.sleep(1)

            browser = LauncheTender1.superAdminValidlogin(browser)
            registration = RegistrationineT()
            time.sleep(3)
            browser = registration.selectusersmenu(browser)
            time.sleep(1)
            browser = registration.usersearch(browser)
            time.sleep(1)
            browser = registration.userdetails(browser)
            time.sleep(1)

            userprofilevalidateFLEP = DataDriver()
            userfirstName_path = userprofilevalidateFLEP.readfromXML(
                folder_path + '\\Object\\UserProfileObject.xml', 'eTender',
                'firstnameindetails'
            )  #Firstname #FLEP -->Firstname , LastName , Email and Phone
            time.sleep(3)
            userfirstName = browser.find_element_by_xpath(userfirstName_path)
            time.sleep(3)
            userfirstName1 = userfirstName.text
            self.assertEqual(userfirstName1, 'suresh1')

            userLastName_path = userprofilevalidateFLEP.readfromXML(
                folder_path + '\\Object\\UserProfileObject.xml', 'eTender',
                'lastnameindetails')  #LastName
            time.sleep(3)
            userLastName = browser.find_element_by_xpath(userLastName_path)
            time.sleep(3)
            userLastName1 = userLastName.text
            self.assertEqual(userLastName1, 'kumar1')

            useremail_path = userprofilevalidateFLEP.readfromXML(
                folder_path + '\\Object\\UserProfileObject.xml', 'eTender',
                'emaildetails')  #Email
            time.sleep(3)
            useremail = browser.find_element_by_xpath(useremail_path)
            time.sleep(3)
            useremail1 = useremail.text
            self.assertEqual(useremail1, '*****@*****.**')
            time.sleep(2)

            usermobile_path = userprofilevalidateFLEP.readfromXML(
                folder_path + '\\Object\\UserProfileObject.xml', 'eTender',
                'phonedetails')  #MobilePhone
            time.sleep(3)
            usermobile = browser.find_element_by_xpath(usermobile_path)
            time.sleep(3)
            usermobile1 = usermobile.text
            self.assertEqual(usermobile1, '9342733658')
            time.sleep(2)

            logs.info("Test Case No : 100191 Passed Successfully")
            time.sleep(2)
            browser = registration.userdetailsclose(browser)
            time.sleep(1)
            browser = logoutEstimator.logout_eTender(browser)
            time.sleep(1)
        except Exception:
            logs.error("Validation with Test Case No: 100191 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100191 failed")
            browser.implicitly_wait(5)
        finally:
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(1)
            userprofile = UserProfileinfo()
            browser = userprofile.userprofilelink(browser)
            time.sleep(1)
            browser = userprofile.UserProfilePageUpdatebacktoOriginal(browser)
            time.sleep(1)
            LauncheTender1.closebrowser(browser)
    def test_OrganisationprofileValidatedetailsinSuperadmin(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(7)
            ##            browser = LauncheTender1.switchOrganisation(browser)
            ##            time.sleep(1)
            ##            browser = LauncheTender1.selectfirstOrganisation(browser)
            ##            time.sleep(7)
            Organizationprofile = OrganisationProfile()
            browser = Organizationprofile.OpenOrganisationProfilePage(browser)
            time.sleep(1)
            browser = Organizationprofile.OrganisationProfilePageUpdate(
                browser)
            time.sleep(2)

            logoutEstimator = Userprofilemenu()
            browser = logoutEstimator.logout_eTender(browser)
            time.sleep(1)

            browser = LauncheTender1.superAdminValidlogin(browser)
            registration = RegistrationineT()
            browser = registration.organisationmenu(browser)
            time.sleep(1)
            browser = registration.organisationsearch(browser)

            organisationprofilevalidateNPWE = DataDriver()
            organisationName_path = organisationprofilevalidateNPWE.readfromXML(
                folder_path + '\Object\OrgProfileObject.xml', 'eTender',
                'organisationName')  #organisationName
            time.sleep(3)
            organisationName = browser.find_element_by_xpath(
                organisationName_path)
            time.sleep(3)
            organisationName1 = organisationName.text
            self.assertEqual(organisationName1, 'DownerMouchelTest')

            organisationPhone_path = organisationprofilevalidateNPWE.readfromXML(
                folder_path + '\Object\OrgProfileObject.xml', 'eTender',
                'organisationphone')  #organisationphone
            time.sleep(1)
            organisationPhone = browser.find_element_by_xpath(
                organisationPhone_path)
            time.sleep(1)
            organisationPhone1 = organisationPhone.text
            self.assertEqual(organisationPhone1, '08025226964')

            organisationWebsite_path = organisationprofilevalidateNPWE.readfromXML(
                folder_path + '\Object\OrgProfileObject.xml', 'eTender',
                'organisationwebsite')  #organisationwebsite
            time.sleep(1)
            organisationWebsite = browser.find_element_by_xpath(
                organisationWebsite_path)
            time.sleep(1)
            organisationWebsite1 = organisationWebsite.text
            self.assertEqual(organisationWebsite1, 'www.downermouchelTest.com')
            time.sleep(2)

            organisationEmail_path = organisationprofilevalidateNPWE.readfromXML(
                folder_path + '\Object\OrgProfileObject.xml', 'eTender',
                'organizationEmail')  #organisationEmail
            time.sleep(1)
            organisationEmail = browser.find_element_by_xpath(
                organisationEmail_path)
            time.sleep(1)
            organisationEmail1 = organisationEmail.text
            self.assertEqual(organisationEmail1, '*****@*****.**')
            time.sleep(2)
            logs.info("Test Case No : 100187 Passed Successfully")
            time.sleep(2)
            browser = registration.organisationdetailsclose(browser)
            time.sleep(1)
            browser = logoutEstimator.logout_eTender(browser)
            time.sleep(1)
            browser = LauncheTender1.estimatorValidlogin(browser)
            time.sleep(1)
        except Exception:
            logs.error("Validation with Test Case No: 100187 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100187 failed")
            browser.implicitly_wait(5)
        finally:
            browser = Organizationprofile.OrganisationProfilePageUpdatetoOriginal(
                browser)
            time.sleep(3)
            browser = LauncheTender1.switchOrganisation(browser)
            time.sleep(1)
            browser = LauncheTender1.selectsecondOrganisation(browser)
            time.sleep(7)
            LauncheTender1.closebrowser(browser)