hints for py/selenium/webdriver/common/actions/key_input.py
@@ -22,30 +22,30 @@ from .interaction import (Interaction,
class KeyInput(InputDevice):
- def __init__(self, name):
+ def __init__(self, name) -> None:
super(KeyInput, self).__init__()
self.name = name
self.type = interaction.KEY
- def encode(self):
+ def encode(self) -> dict:
return {"type": self.type, "id": self.name, "actions": [acts.encode() for acts in self.actions]}
- def create_key_down(self, key):
+ def create_key_down(self, key) -> None:
self.add_action(TypingInteraction(self, "keyDown", key))
- def create_key_up(self, key):
+ def create_key_up(self, key) -> None:
self.add_action(TypingInteraction(self, "keyUp", key))
- def create_pause(self, pause_duration=0):
+ def create_pause(self, pause_duration=0) -> None:
self.add_action(Pause(self, pause_duration))
class TypingInteraction(Interaction):
- def __init__(self, source, type_, key):
+ def __init__(self, source, type_, key) -> None:
super(TypingInteraction, self).__init__(source)
self.type = type_
self.key = key
- def encode(self):
+ def encode(self) -> dict:
return {"type": self.type, "value": self.key}
