I am using selenium webdriver to complete a form but would like to simulate human behaviour when typing and not auto filling with my values.
For example:
driver.find_element_by_id("Address").send_keys("Anthony Street 35th")
I would want to simulate human behavior when typing Anthony Street, with random time pauses between each key stroke.
Can this be done ?
just send one letter at a time through a loop.
address = 'Anthony Street 35'
address_elem = driver.find_element_by_id("Address")
for letter in address:
time.sleep(random.randint(1, 3)) # sleep between 1 and 3 seconds
address_elem.send_keys(letter)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With