I am trying to make this thing where a bot can answer questions on quora. But while creating this I ran into a problem with clicking on the answer button. It just wouldn't work. Anyone some kind of advice?
You can use selenium
to click a button in python.
Example:
from selenium import webdriver
driver = webdriver.Chrome(chrome_options=options)
driver.get('http://codepad.org')
python_button = driver.find_elements_by_xpath("//input[@name='lang' and @value='Python']")[0]
python_button.click()
Hope it was usefull
Edit:
You can get the XPath of an element by copying it from the console (when inspecting the element)
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.