def test_removeUsertoOrg(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         browser.implicitly_wait(10)
         orgInstance = Organizationclass()
         logOut = Userprofilemenu()
         orgInstance.OpenaddUser(browser)
         browser.implicitly_wait(10)
         browser = orgInstance.AddUserOrganization(browser)
         time.sleep(3)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'saveButon')).click()
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source)
         orgInstance.RemoveUserOrganization(browser)
         self.assertFalse(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source)
         time.sleep(2)
         logs.info("Test Case No : 100105 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100111 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100105 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
 def test_messageforAddUser(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         browser.implicitly_wait(10)
         orgInstance = Organizationclass()
         orgInstance.OpenaddUser(browser)
         addusertoOrg = orgLink.readfromXML(
             folder_path + '\Object\Object.xml', 'eTender',
             'adduserOrganisation')
         browser.find_element_by_xpath(addusertoOrg).click()
         browser.find_element_by_id(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'adduserSavebutton')).click()
         time.sleep(3)
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'warninginUser') in browser.page_source)
         logs.info("Test Case No : 100138 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100138 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100138 failed")
     finally:
         browser = LauncheTender.closebrowser(browser)
Ejemplo n.º 3
0
 def test_Profilelocation(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         logOut=Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser= LauncheTender.subcontractorValidlogin(browser)
         orgInstance=Organizationclass()
         orgInstance.OpenProfilePage(browser)
         time.sleep(2)
         textvalue=orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','locationtext')
         time.sleep(2)
         savebutton=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','saveinprofile'))
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','locationprofile')).send_keys(textvalue)
         p=browser.find_elements_by_css_selector(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','locationLink'))
         p[0].click()
         time.sleep(2)
         self.assertEqual(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','addresstextbox')).get_attribute('value'),orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','addresstext'))
         time.sleep(2)
         browser.execute_script("arguments[0].scrollIntoView(true);", savebutton)
         savebutton.click()
         orgInstance.OpenaddUser(browser)
         orgInstance.OpenProfilePage(browser)
         time.sleep(2)
         self.assertEqual(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\Object.xml','eTender','addresstextbox')).get_attribute('value'),orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','addresstext'))
         logs.info("Test Case No : 100098 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100098 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100098 failed")
     finally:
         browser=logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
 def test_userSelectionverification(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(10)
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         orgInstance = Organizationclass()
         logOut = Userprofilemenu()
         orgInstance.OpenUserRole(browser)
         time.sleep(3)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'managerole')).click()
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'warninginRole') in browser.page_source)
         time.sleep(3)
         logs.info("Test Case No : 100118 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100118 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100118 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
Ejemplo n.º 5
0
 def test_UserProfileSave(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser= LauncheTender.subcontractorValidlogin(browser)
         orgInstance=Organizationclass()
         logOut=Userprofilemenu()
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(3)
         textvalue=orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','nametextprofile')
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).clear()
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).send_keys(textvalue)
         sbutton=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','savebutton'))
         browser.execute_script("arguments[0].scrollIntoView(true);", sbutton)
         time.sleep(2)
         sbutton.click()
         orgInstance.OpenaddUser(browser)
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(2)
         self.assertEquals(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).get_attribute('value'),textvalue)
         logs.info("Test Case No : 100160 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100160 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100160 failed")
     finally:
         browser=logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
Ejemplo n.º 6
0
    def test_AddUsernotification(self):
        try:
            browserInstance = setupValue()
            adminfunction = Adminclass()
            browser = browserInstance.setupfunction()
            browser.implicitly_wait(5)
            LauncheTender1 = LauncheTenderclass()
            logOut = Userprofilemenu()
            browser = LauncheTender1.openURL(browser)
            browser = LauncheTender1.estimatorValidlogin(browser)
            orgInstance = Organizationclass()
            orgInstance.OpenaddUser(browser)
            browser = orgInstance.AddUserOrganization(browser)
            browser.find_element_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'saveButon')).click()
            adminfunction = Adminclass()
            adminfunction.OpenNotificationRecipients(browser)
            time.sleep(3)
            p = browser.find_elements_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'emailrolebox'))
            time.sleep(2)
            p[1].send_keys(
                orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                    'userSaveEmail'))
            browser.find_element_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'adduserCheckbox')).click()
            browser.find_element_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'saveButon')).click()
            time.sleep(2)
            adminfunction.OpenTags(browser)
            adminfunction.OpenNotificationRecipients(browser)
            p = browser.find_elements_by_xpath(
                orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                    'eTender', 'emailrolebox'))
            p[1].send_keys(
                orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                    'userSaveEmail'))
            time.sleep(2)
            self.assertTrue(
                browser.find_element_by_xpath(
                    orgLink.readfromXML(
                        folder_path + '\Object\AdminEstimator.xml', 'eTender',
                        'Usercheckbox')))

        except Exception:
            logs.error("Validation with Test Case No: 100170 failed")
            browser.save_screenshot(fullpath)
            traceback.print_exc(file=sys.stdout)
            self.fail("Test Case No: 100170 failed")
            browser.implicitly_wait(5)
        finally:
            browser = logOut.logout_eTender(browser)
            LauncheTender1.closebrowser(browser)
Ejemplo n.º 7
0
 def test_FootNote(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(10)
         LauncheTender = LauncheTenderclass()
         TenderAction = TenderClass()
         adminfunction = Adminclass()
         logOut = Userprofilemenu()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin1(browser)
         time.sleep(4)
         orgInstance = Organizationclass()
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(2)
         browser.find_element_by_xpath(
             orgLink.readfromXML(
                 folder_path + '\Object\UserProfileObject.xml', 'eTender',
                 'SignatureBox')).clear()
         fakeValue = Factory.create()
         Signote = fakeValue.name()
         SignoteValue = str(Signote)
         browser.find_element_by_xpath(
             orgLink.readfromXML(
                 folder_path + '\\Object\\UserProfileObject.xml', 'eTender',
                 'SignatureBox')).send_keys(SignoteValue)
         sbutton = browser.find_element_by_xpath(
             orgLink.readfromXML(
                 folder_path + '\\Object\\UserProfileObject.xml', 'eTender',
                 'savebutton'))
         time.sleep(2)
         browser.execute_script("arguments[0].scrollIntoView(true);",
                                sbutton)
         time.sleep(2)
         sbutton.click()
         adminfunction.EmailSetup(browser)
         time.sleep(2)
         footnote = browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\\Object\\EmailSetup.xml',
                                 'eTender',
                                 'FootNote')).get_attribute('innerText')
         time.sleep(2)
         time.sleep(3)
         sfootnote = str(footnote)
         sfootnote = sfootnote.strip()
         self.assertEquals(SignoteValue, sfootnote)
         logs.info("Test Case No : 100355 Passed Successfully")
     except Exception:
         logs.error("Test Case No: 100355 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100355 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
 def test_ProfileUI(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         orgInstance = Organizationclass()
         orgInstance.OpenProfilePage(browser)
         time.sleep(3)
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'nameinProfile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'phoneinProfile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'webinProfile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'emailinprofile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'addressinprofile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'countyinprofile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'countryinprofile')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                     'eTender', 'postalinprofile')))
         logs.info("Test Case No : 100097 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100097 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100097 failed")
         browser.implicitly_wait(5)
     finally:
         browser = LauncheTender.closebrowser(browser)
Ejemplo n.º 9
0
 def test_duplicatetagverification(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         logOut = Userprofilemenu()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.estimatorValidlogin(browser)
         orgInstance = Organizationclass()
         adminfunction.OpenTags(browser)
         fake = Factory.create()
         fakevalue = fake.name()
         tagString = str(fakevalue)
         adminfunction.TagCreation(browser, tagString)
         time.sleep(2)
         adminfunction.TagCreation(browser, tagString)
         message = str('Tag with name ' + '[' + tagString + ']' +
                       ' already exist')
         self.assertTrue(message in browser.page_source)
     except Exception:
         logs.error("Validation with Test Case No: 100178 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100178 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender1.closebrowser(browser)
Ejemplo n.º 10
0
 def test_cancelButton(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         logOut = Userprofilemenu()
         browser.implicitly_wait(10)
         LauncheTender.subcontractorValidlogin(browser)
         orgInstance = Organizationclass()
         orgInstance.OpenaddUser(browser)
         time.sleep(2)
         if (orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source):
             orgInstance.RemoveUserOrganization(browser)
         orgInstance.AddUserOrganizationCancel(browser)
         time.sleep(2)
         orgInstance.OpenUserRole(browser)
         time.sleep(2)
         orgInstance.OpenaddUser(browser)
         time.sleep(2)
         self.assertFalse(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail') in browser.page_source)
         logs.info("Test Case No : 100103 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100103 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100103 failed")
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
Ejemplo n.º 11
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)
Ejemplo n.º 12
0
 def test_tagdeletion(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.estimatorValidlogin(browser)
         orgInstance = Organizationclass()
         adminfunction.OpenTags(browser)
         logOut = Userprofilemenu()
         fake = Factory.create()
         fakevalue = fake.name()
         tagString = str(fakevalue)
         adminfunction.TagCreation(browser, tagString)
         time.sleep(3)
         adminfunction.TagDeletion(browser, tagString)
         time.sleep(2)
         message = str('Tag ' + tagString + ' has been deleted')
         self.assertTrue(message in browser.page_source)
         time.sleep(2)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender', 'TagNewSearchBox')).clear()
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender',
                                 'TagNewSearchBox')).send_keys(tagString)
         try:
             browser.find_element_by_xpath(
                 browser.find_element_by_xpath(
                     orgLink.readfromXML(
                         folder_path + '\Object\AdminEstimator.xml',
                         'eTender', 'TagValue')))
         except NoSuchElementException:
             logs.info("Test Case No : 100122 Passed Successfully")
             return True
         return False
     except Exception:
         logs.error("Validation with Test Case No: 100122 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100122 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
Ejemplo n.º 13
0
 def test_newtagcreation(self):
     try:
         browserInstance = setupValue()
         adminfunction = Adminclass()
         browser = browserInstance.setupfunction()
         browser.implicitly_wait(5)
         LauncheTender1 = LauncheTenderclass()
         logOut = Userprofilemenu()
         browser = LauncheTender1.openURL(browser)
         browser = LauncheTender1.estimatorValidlogin(browser)
         orgInstance = Organizationclass()
         adminfunction.OpenTags(browser)
         fake = Factory.create()
         fakevalue = fake.name()
         tagString = str(fakevalue)
         adminfunction.TagCreation(browser, tagString)
         time.sleep(2)
         message = str('Tag ' + tagString + ' has been created')
         self.assertTrue(message in browser.page_source)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\AdminEstimator.xml',
                                 'eTender',
                                 'TagSearchBox')).send_keys(tagString)
         time.sleep(2)
         self.assertEquals(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\Object\AdminEstimator.xml', 'eTender',
                     'TagValue')).get_attribute('innerHTML'), tagString)
     except Exception:
         logs.error("Validation with Test Case No: 100177 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100177 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender1.closebrowser(browser)
Ejemplo n.º 14
0
 def test_minimumroletoUser(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         orgInstance = Organizationclass()
         logOut = Userprofilemenu()
         orgInstance.OpenaddUser(browser)
         browser = orgInstance.AddUserOrganization(browser)
         time.sleep(3)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'saveButon')).click()
         time.sleep(3)
         orgInstance.OpenUserRole(browser)
         time.sleep(4)
         p = browser.find_elements_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'emailrolebox'))
         p[1].send_keys(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'userSaveEmail'))
         time.sleep(5)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'adduserCheckbox')).click()
         time.sleep(2)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'managerole')).click()
         time.sleep(4)
         Checkbox1 = browser.find_elements_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'adduserCheckbox'))
         Checkbox1[0].click()
         time.sleep(5)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'checkboxSelectedAll')).click()
         time.sleep(2)
         browser.find_element_by_id(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'updatebutton')).click()
         time.sleep(2)
         self.assertTrue(
             orgLink.readfromXML(folder_path + '\Data\Data.xml', 'eTender',
                                 'roleMessage') in browser.page_source)
         time.sleep(2)
         browser.find_element_by_xpath(
             orgLink.readfromXML(folder_path + '\Object\Object.xml',
                                 'eTender', 'CancelAddRole')).click()
         time.sleep(2)
         logs.info("Test Case No : 100118 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100118 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100118 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
Ejemplo n.º 15
0
 def test_userProfileUI(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser = LauncheTender.subcontractorValidlogin(browser)
         logOut = Userprofilemenu()
         orgInstance = Organizationclass()
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(3)
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'title')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'Firstname')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'lastname')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'jobtitle')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'email')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'mphone')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'phone')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'linkedin')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'address')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'eFootNote')))
         ##            self.assertTrue(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\UserProfileObject.xml','eTender','county')))
         ##            self.assertTrue(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\UserProfileObject.xml','eTender','country')))
         ##            self.assertTrue(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\Object\UserProfileObject.xml','eTender','pcode')))
         self.assertTrue(
             browser.find_element_by_xpath(
                 orgLink.readfromXML(
                     folder_path + '\\Object\\UserProfileObject.xml',
                     'eTender', 'image')))
         logs.info("Test Case No : 100157 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100157 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100157 failed")
         browser.implicitly_wait(5)
     finally:
         browser = logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)