Skip to content

Commit

Permalink
Align Send Alert Text with Element Send Keys
Browse files Browse the repository at this point in the history
The WebDriver specification has been updated to align Send Alert Text
and Element Send Keys so they both send the same key and value structure
simplifying send keys between the two.
  • Loading branch information
AutomatedTester committed Jul 21, 2016
1 parent 352e5da commit 60299ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion py/selenium/webdriver/common/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
The Alert implementation.
"""

from selenium.webdriver.common.utils import keys_to_typing
from selenium.webdriver.remote.command import Command


Expand Down Expand Up @@ -88,7 +89,10 @@ def send_keys(self, keysToSend):
"""
self.driver.execute(Command.SET_ALERT_VALUE, {'text': keysToSend})
if self.driver.w3c:
self.driver.execute(Command.SET_ALERT_VALUE, {'value': keys_to_typing(keysToSend)})
else:
self.driver.execute(Command.SET_ALERT_VALUE, {'text': keysToSend})

def authenticate(self, username, password):
"""
Expand Down

0 comments on commit 60299ea

Please sign in to comment.