Answer the question
In order to leave comments, you need to log in
How to make button click by Selenium coordinates?
How to make a button click, or rather a checkbox through the coordinates of how many such checkboxes are very many and how to find the necessary coordinates on the mrush.mobi
site itself (you need to press enter several times for the captcha to appear)
My code
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:\mrush\chromedriver.exe')
url = "http://mrush.mobi"
driver.get(url)
login = driver.find_element_by_css_selector("input[name='name']")
login.clear()
login.send_keys("mylogin")
pswd = driver.find_element_by_css_selector("input[name='password']")
pswd.send_keys("mypassword")
driver.find_element_by_css_selector("input[type='submit']").click()
Answer the question
In order to leave comments, you need to log in
checkboxes = driver.find_elements(By.XPATH, '//input[@type="checkbox"]')
for box in checkboxes:
try:
box.click()
except Exception:
pass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question