In this case all the job names have the two CSS classes jobProperty
and jobtitle
.
So, since you want all the jobs, I recommend selecting by CSS selector.
The following example should work:
driver.get('https://jobs.ubs.com/TGnewUI/Search/home/HomeWithPreLoad?partnerid=25008&siteid=5012&PageType=searchResults&SearchType=linkquery&LinkID=6017#keyWordSearch=&locationSearch=')
job_roles = driver.find_elements_by_css_selector('.jobProperty.jobtitle')
for job_roles in job_roles:
text = job_roles.text
print(text)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…