Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler committed Jun 11, 2024
1 parent 4d2e009 commit ea6bfea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions splinter/driver/webdriver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def press(self, key: str, delay: int = 0) -> None:

for item in key_pattern:
# If in selenium keys, use it, if not, assume literal.
key_value = getattr(Keys, item)
key_value = getattr(Keys, item, None)

if key_value:
chain = chain.key_down(key_value, self._element)
Expand All @@ -815,7 +815,7 @@ def press(self, key: str, delay: int = 0) -> None:

for item in key_pattern:
# If in selenium keys, use it, if not, assume literal.
key_value = getattr(Keys, item)
key_value = getattr(Keys, item, None)

if key_value:
chain = chain.key_up(key_value, self._element)
Expand Down
4 changes: 2 additions & 2 deletions splinter/driver/webdriver/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def press(self, key: str, delay: int = 0) -> None:

for item in key_pattern:
# If in selenium keys, use it, if not, assume literal.
key_value = getattr(Keys, item)
key_value = getattr(Keys, item, None)

if key_value:
chain = chain.key_down(key_value) # , self._element)
Expand All @@ -39,7 +39,7 @@ def press(self, key: str, delay: int = 0) -> None:

for item in key_pattern:
# If in selenium keys, use it, if not, assume literal.
key_value = getattr(Keys, item)
key_value = getattr(Keys, item, None)

if key_value:
chain = chain.key_up(key_value) # , self._element)
Expand Down

0 comments on commit ea6bfea

Please sign in to comment.