I want to save a text, as a variable, from a website with python.
driver.find_element_by_class_name('plaint').storetext()
I don't know how to do this right. Thanks
I want to save a text, as a variable, from a website with python.
driver.find_element_by_class_name('plaint').storetext()
I don't know how to do this right. Thanks
Instead of using selenium to store the text why not try just grabbing the information and storing it into your own variable.
element_to_store = driver.find_element_by_class_name("class name").text()
Lets say you use class name and .text()
to find an element and its text value. once you use element_to_store
to find the text, you can then use element_to_store
and call it when you need it as its value is the .text()
string of the element you searched for.