Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97802

Python selenium 'list' object has no attribute 'text' error

$
0
0

I'm trying to copy text from comment on a website<span class="auto-link">yes</span> and my python code is

element=browser.find_elements_by_xpath('//span[@class="auto-link"][1]')
print(element.text)

but I keep on getting the 'list' object has no attribute 'text' error, I don't know what I'm doing wrong.


Viewing all articles
Browse latest Browse all 97802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>