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_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)
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)