def plantemplatecreationwithstages(self,browser): time.sleep(1) templatecreationstages = DataDriver() time.sleep(1) templatecreationstages_path = templatecreationstages.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','templatecreationaddstage') time.sleep(1) templatecreationstages = browser.find_element_by_id(templatecreationstages_path) #Path for add/Remove stages time.sleep(1) templatecreationstages.click() time.sleep(3) templatecreationstages1 = DataDriver() selectstages_path = templatecreationstages1.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','selectstages1') time.sleep(1) selectstages = browser.find_elements_by_xpath(selectstages_path) #Path for select stages time.sleep(1) #selectstages.click() counter = 0 for test in range(counter,7): selectstages[counter].click() #Select specific stages time.sleep(1) counter = counter + 1 time.sleep(2) updatestages_path = templatecreationstages1.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','savestages') time.sleep(1) updatestages = browser.find_element_by_id(updatestages_path) #Path for update stages time.sleep(1) updatestages.click() time.sleep(1) return browser
def plantemplateupdation(self,browser): time.sleep(1) templateupdation = DataDriver() templateupdation_path = templateupdation.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','templateedition') templateupdation = browser.find_element_by_xpath(templateupdation_path) time.sleep(1) templateupdation.click() #template updation time.sleep(1) return browser
def plantemplatebutton(self,browser): time.sleep(1) templatebutton = DataDriver() time.sleep(2) templatebutton_path = templatebutton.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','createtemplatebutton') time.sleep(2) templatebutton = browser.find_element_by_xpath(templatebutton_path) #Path Create template button time.sleep(2) templatebutton.click() #Click Create template button return browser
def userprofilelink(self, browser): userprofile = DataDriver() time.sleep(1) userprofile_path = userprofile.readfromXML( folder_path + '\Object\SwitchOrganisation.xml', 'eTender', 'userprofile') time.sleep(1) userprofile = browser.find_element_by_link_text(userprofile_path) time.sleep(1) userprofile.click() return browser
def OrganisationProfilePageUpdate(self,browser): organisationdetailsupdate = DataDriver() organisationdetailsupdatename_path = organisationdetailsupdate.readfromXML(folder_path+'\Object\OrgProfileObject.xml','eTender','orgName1') organisationdetailsupdatename = browser.find_element_by_xpath(organisationdetailsupdatename_path) organisationdetailsupdatename.clear() organisationdetailsupdatename.click() organisationdetailsupdatename_data = organisationdetailsupdate.readfromXML(folder_path+'\Data\OrganisationDetails.xml','eTender','orgname') organisationdetailsupdatename.send_keys(organisationdetailsupdatename_data) organisationdetailsupdatephone_path = organisationdetailsupdate.readfromXML(folder_path+'\Object\OrgProfileObject.xml','eTender','orgPhone1') organisationdetailsupdatephone = browser.find_element_by_xpath(organisationdetailsupdatephone_path) organisationdetailsupdatephone.clear() organisationdetailsupdatephone.click() organisationdetailsupdatephone_data = organisationdetailsupdate.readfromXML(folder_path+'\Data\OrganisationDetails.xml','eTender','orgphone') organisationdetailsupdatephone.send_keys(organisationdetailsupdatephone_data) organisationdetailsupdatewebsite_path = organisationdetailsupdate.readfromXML(folder_path+'\Object\OrgProfileObject.xml','eTender','organisationWebsite1') organisationdetailsupdate2 = browser.find_element_by_xpath(organisationdetailsupdatewebsite_path) organisationdetailsupdate2.clear() organisationdetailsupdatewebsite_data = organisationdetailsupdate.readfromXML(folder_path+'\Data\OrganisationDetails.xml','eTender','orgwebsite') organisationdetailsupdate2.send_keys(organisationdetailsupdatewebsite_data) time.sleep(1) organisationdetailsupdateEmail_path = organisationdetailsupdate.readfromXML(folder_path+'\Object\OrgProfileObject.xml','eTender','organisationEmail1') organisationdetailsupdateEmail = browser.find_element_by_xpath(organisationdetailsupdateEmail_path) organisationdetailsupdateEmail.clear() organisationdetailsupdateEmail_data = organisationdetailsupdate.readfromXML(folder_path+'\Data\OrganisationDetails.xml','eTender','orgEmail') organisationdetailsupdateEmail.send_keys(organisationdetailsupdateEmail_data) time.sleep(1) ## organisationdetailsupdateImage_path = organisationdetailsupdate.readfromXML(folder_path+'\Object\OrgProfileObject.xml','eTender','OrgImage') ## organisationdetailsupdateImage = browser.find_element_by_xpath(organisationdetailsupdateImage_path) ## organisationdetailsupdateImage.click() ## time.sleep(3) ## os.system(folder_path+'\Env\OrgImageUpload.exe') #This is AUToIT script for Upload a Document(Note:selenium not supporting uploading a document from windows hence we need to install AUTOIT to upload a document) ## time.sleep(3) organisationdetailsupdate_path = organisationdetailsupdate.readfromXML(folder_path+'\Object\OrgProfileObject.xml','eTender','organisatioupdate') organisationdetailsupdate = browser.find_element_by_xpath(organisationdetailsupdate_path) organisationdetailsupdate.click() time.sleep(2) return browser
def plantemplatedelete(self,browser): time.sleep(1) templatedelete = DataDriver() templatedelete_path = templatedelete.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','templateplandelete') templatedelete = browser.find_element_by_xpath(templatedelete_path) time.sleep(3) templatedelete.click() #template delete time.sleep(3) templatedeleteconfirm = [] templatedelete1 = DataDriver() templatedeleteconfirm_path = templatedelete1.readfromXML(folder_path+'\Object\TenderplanObjects.xml','eTender','templateplandelete') templatedeleteconfirm = browser.find_elements_by_xpath(templatedeleteconfirm_path) time.sleep(3) templatedeleteconfirm[1].click() #template delete confirm time.sleep(5) return browser
def changePassword(self, browser): time.sleep(2) changepassword = DataDriver() time.sleep(1) userprofile_path = changepassword.readfromXML( folder_path + '\Object\Object.xml', 'eTender', 'userprofile') time.sleep(1) userprofile_menu = browser.find_element_by_xpath( userprofile_path) #Click on User profile menu on top right Corner userprofile_menu.click() time.sleep(1) browser.implicitly_wait(5) changepassword_path = changepassword.readfromXML( folder_path + '\Object\Object.xml', 'eTender', 'changepassword') changepassword = browser.find_element_by_link_text(changepassword_path) time.sleep(1) changepassword.click() time.sleep(3) return browser