I would like to know the function to transform a list / webelement variable into .txt with the code below I can only read the file on my console en.txt but not save it on my pc.
recuperation_nom = driver.find_elements_by_class_name("title-3")
for resultat_nom in recuperation_nom:
print(resultat_nom.text)
Just open
.txt
file in access mode'a'
, then write each line into it.