From e0bb848d9ac5e4a0235ae67d2a5746611050d953 Mon Sep 17 00:00:00 2001 From: Slayug Date: Sun, 24 Sep 2017 14:02:46 +0200 Subject: [PATCH] auto scroll to radio to click on it to avoid: Element is not clickable at point --- monogen/accountcreator.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/monogen/accountcreator.py b/monogen/accountcreator.py index 396b070..fc491e5 100644 --- a/monogen/accountcreator.py +++ b/monogen/accountcreator.py @@ -133,8 +133,14 @@ def create_account(username, password, email, birthday, captchakey2, captchatime elem.clear() elem.send_keys(email) - driver.find_element_by_id("id_public_profile_opt_in_1").click() - driver.find_element_by_name("terms").click() + element = driver.find_element_by_id("id_public_profile_opt_in_1") + driver.execute_script("arguments[0].scrollIntoView(true);", element) + element.click() + + + element = driver.find_element_by_name("terms") + driver.execute_script("arguments[0].scrollIntoView(true);", element) + element.click() if not captchakey2: #Do manual captcha entry