P
P
picheldos2020-09-14 05:32:19
Python
picheldos, 2020-09-14 05:32:19

Python Selenium element is grayed out, error?

Good morning! I can't figure out why I'm getting an error. I need to write a program for automatic authorization on the website of an educational institution, but the error says that the filling forms are inactive. Why?
Error: selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=85.0.4183.102)

from selenium import webdriver
import schedule
import time
bc=()
l = input('Введите логин: ')
p = input('Введите пароль: ')
print("Данные сохранены. Авторизация на сайт будет происходить в соответствии с расписанием!")
def job():
    browser = webdriver.Chrome()
    browser.get('https://www.pkgn.ru/?razdel=2&url=sveden/students')
    login = browser.find_element_by_name("login")
    login.send_keys (l)
    password = browser.find_element_by_name('password')
    password.send_keys (p)
    bc = browser.find_element_by_class_name("but_avt")
    bc.click()

schedule.every().monday.at("09:28").do(job)
schedule.every().tuesday.at("08:35").do(job)
schedule.every().wednesday.at("08:35").do(job)
schedule.every().thursday.at("10:25").do(job)
schedule.every().friday.at("11:25").do(job)
while True:
    schedule.run_pending()
    time.sleep(1)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-09-14
@picheldos

Ctrl+F press, and enter your data in the search. You will see that there are two login fields, two passwords and two submit buttons. You need a second one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question