Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97778

Selenium inserting random letters from password

$
0
0

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. enter image description here

HTML5 coding of this page looks like this:

  • for uneditable fields in this case field No 1: enter image description here

  • for editable field where I am supose to inter letter in this case No 2: enter image description here

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


Viewing all articles
Browse latest Browse all 97778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>