-
| How do I type ESC, ENTER and other keys? | 
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Beta Was this translation helpful? Give feedback.
-
| 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.
-
| hey @mdmintz how can we press keys in  | 
Beta Was this translation helpful? Give feedback.



For using special keys, you can use:
But for hitting ENTER/RETURN, you can use
\n. Example: