Exemplo n.º 1
0
 def test_UserProfileSave(self):
     try:
         browserInstance = setupValue()
         browser = browserInstance.setupfunction()
         LauncheTender = LauncheTenderclass()
         browser = LauncheTender.openURL(browser)
         browser= LauncheTender.subcontractorValidlogin(browser)
         orgInstance=Organizationclass()
         logOut=Userprofilemenu()
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(3)
         textvalue=orgLink.readfromXML(folder_path+'\Data\Data.xml','eTender','nametextprofile')
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).clear()
         browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).send_keys(textvalue)
         sbutton=browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','savebutton'))
         browser.execute_script("arguments[0].scrollIntoView(true);", sbutton)
         time.sleep(2)
         sbutton.click()
         orgInstance.OpenaddUser(browser)
         orgInstance.OpenUserProfilePage(browser)
         time.sleep(2)
         self.assertEquals(browser.find_element_by_xpath(orgLink.readfromXML(folder_path+'\\Object\\UserProfileObject.xml','eTender','FirstnameTextbox')).get_attribute('value'),textvalue)
         logs.info("Test Case No : 100160 Passed Successfully")
     except Exception:
         logs.error("Validation with Test Case No: 100160 failed")
         browser.save_screenshot(fullpath)
         traceback.print_exc(file=sys.stdout)
         self.fail("Test Case No: 100160 failed")
     finally:
         browser=logOut.logout_eTender(browser)
         LauncheTender.closebrowser(browser)
 def test_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)
Exemplo n.º 3
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)