Here is my code:
for i in patient:
patientFind.send_keys([i])
patientFind.send_keys(Keys.ARROW_DOWN)
patientFind.send_keys(Keys.ENTER)
so there is this text box where I need to individually input the letters and a drop down menu appears as each letter is put in the text box.
Unfortunately after that for loop end there is a tiny bit of delay in the drop box selection so it ends up clicking the wrong thing.
Is there a way to make selenium wait a few seconds between key presses? How do I make it so that selenium would wait 1 or 2 seconds after it completes that for loop before it goes on to press the down arrow?
Of course I can use time.sleep(5)
, however is there any better way of doing it using webdriver?