-
How do I type ESC, ENTER and other keys? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
For using special keys, you can use: from selenium.webdriver.common.keys import Keys
...
...
self.send_keys(SELECTOR, Keys.ESCAPE) But for hitting ENTER/RETURN, you can use self.type("input#password", "secret_sauce\n") |
Beta Was this translation helpful? Give feedback.
-
@mdmintz But how to press Keys multiple times without specifying element? Say, i want like this But it doesn't work. |
Beta Was this translation helpful? Give feedback.
For using special keys, you can use:
But for hitting ENTER/RETURN, you can use
\n
. Example: