python - Selenium send keys sending too fast -
i'm testing login on site has standard username entry , hidden password input. select username , send string. i'm unable select password box because selenium.common.exceptions.elementnotvisibleexception: message: element not visible
instead this:
login = driver.find_element_by_xpath('/html/body/div/div/div/div/div/div/div/div/input[1]') login.send_keys(foo) login.send_keys(keys.tab + bar + keys.enter)
this never works, password 10 characters long , never manages 10 in password box.
i had thought sleep(1)
between sending keys, due nature of hidden field isn't possible.
how can past issue, either selecting password field directly, or allowing string sent in full?
edit
the website sports betting section of this site. of unable view because of jurisdiction reasons, i'll provide html sample of when i'm home.
i think of issue how trying sendkeys password field using tab. there's no need rely on tabbing right element, grab 1 want. also, using xpath more 4-5 levels deep find element (especially 1 starts @ html tag) not practice. prone changes in page , break. below.
driver.find_element_by_css_selector("div.hm-login_usernamewrapper > input.hm-login_inputfield").send_keys(username) driver.find_element_by_css_selector("div.hm-login_passwordwrapper > input.hm-login_inputfield")).send_keys(username)
there input field marked type=password
<input type="password" class="hm-login_inputfield hidden ">
but hidden not 1 user type into. selectors specified above tested , worked.
Comments
Post a Comment