def applyToAllUrls(browser, reflst, us): jobsearchurl = browser.current_url res = getJobSearchResults(browser) links = BO.getLinksFromElements(res) for link in links: browser.get(link) details = getJobDetails(browser) details['path'] = us.personal['LogPathPagePersonnel'] if str(details['reference']) not in reflst: applyToJob(browser, us) details['method'] = 'CV' DL.writeLogToCSV(details) reflst.add(details['reference']) browser.get(jobsearchurl) time.sleep(3)
def applyToAllUrls(browser, reflst, us): jobsearchurl = browser.current_url res = getJobSearchResults(browser) links = BO.getLinksFromElements(res) for link in links: browser.get(link) # we must verify that the page is the standard application page # neither is from indeed, or a vacancy completed or forbiden if BO.isElementPresent(browser,'searchContainer'): #if this element is present, we are in the correct page details = getJobDetails(browser) details['path'] = us.personal['LogPathJobsInGeneva'] if str(details['reference']) not in reflst: applyToJob(browser, us) details['method'] = 'CV' DL.writeLogToCSV(details) reflst.add(details['reference']) time.sleep(2) browser.get(jobsearchurl) time.sleep(3)