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

Send a Instagram comment using Python with Selenium

$
0
0

I want to submit a comment using Python with Selenium. The comment box in Instagram web looks like this:

<textarea aria-label="Añade un comentario..." placeholder="Añade un comentario..." class="Ypffh" autocomplete="off" autocorrect="off" style="height: 18px;"></textarea>

My Python code:

coment_box = driver.find_elements_by_css_selector("form textarea") 
coment_box.send_keys("Nice picture")

I tried to use the find_by_xpath("here_xpath") but it returns me an error saying that: AttributeError: 'list' object has no attribute 'send_keys'.


Viewing all articles
Browse latest Browse all 97788

Trending Articles



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