I am trying to create a bot using Selenium which will log in to my back accountand download incomes and outcomes and generate raports. I am stuck with logging in as for the first time I need to insert just randomly choosen letters from my password instead of putting in whole. So far my code, is not existing as I want to log in first before I start writting next features.
class BankAccountLogin():
def __init__(self):
self.driver = webdriver.Chrome()
def login(self, login, password):
self.driver.get("https://system.aliorbank.pl/sign-in")
sleep(1)
self.driver.find_element_by_id("login").send_keys(login, "\n")
bank_app = BankAccountLogin()
bank_app.login(login, password)
Password area looks like this and it's chaning after every log in attempt.
HTML5 coding of this page looks like this:
for uneditable fields in this case field No 1:
for editable field where I am supose to inter letter in this case No 2:
I tried looking for help everywhere online bu couldn't find anyone trying to solve this issue. Trying to refer to that password letter areas as to
self.driver.find_element_by_css_selector("input[type='password']").send_keys("x")
resulted with Error:
AttributeError: 'list' object has no attribute 'send_keys'
Can anyone please help me with this? Thank you