How can I get all text elements with selenium. This is my try, it return None.
try:
description = browser.find_element_by_class_name("jobDescriptionText").text
except:
description = "None"
descriptions.append(description)
print(description)
time.sleep( 5 )
I would like to get all the text between these elements. How I can do that?
You probably confused yourself link is just a string and checking the html i think you meant id
not class
, Use:
description = browser.find_element_by_id("jobDescriptionText").text
Instead of:
description = link.find_element_by_class_name("jobDescriptionText").text
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.