diff --git a/splinter/driver/__init__.py b/splinter/driver/__init__.py index a57ea263f..e9714ca23 100644 --- a/splinter/driver/__init__.py +++ b/splinter/driver/__init__.py @@ -871,6 +871,23 @@ def type(self, value: str, slowly: bool = False) -> str: # NOQA: A003 """ raise NotImplementedError + def press(self, key: str, delay: int = 0) -> None: + """Focus the element and press the specified key pattern. + + Key names are case sensitive. + + Arguments: + key_name: Name of the key to press. + delay: Time, in seconds, to wait between key down and key up. + + Example: + + >>> browser.find_by_css('.my_element').press('ENTER') + >>> browser.find_by_css('.my_element').press('SHIFT+awesome') + + """ + raise NotImplementedError + def select(self, value: str, slowly: bool = False) -> None: """ Select an ``