Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2510)

Unified Diff: chrome/test/chromedriver/client/chromedriver.py

Issue 2302803004: [chromedriver] Set |key| when calling Input.dispatchKeyEvent. (Closed)
Patch Set: dont set key if keycode conversion doesnt return anything (this happens for char events, for exampl… Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/chrome/web_view_impl.cc ('k') | chrome/test/chromedriver/test/run_py_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/client/chromedriver.py
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 183af40d92f7129ba322b924f8b78f8ede8c8ce7..979da9eca3e662990a4156173541df8e021b7ed2 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -491,4 +491,13 @@ class ChromeDriver(object):
self.ExecuteCommand(Command.SET_SCREEN_ORIENTATION, params)
def DeleteScreenOrientationLock(self):
- self.ExecuteCommand(Command.DELETE_SCREEN_ORIENTATION)
+ self.ExecuteCommand(Command.DELETE_SCREEN_ORIENTATION)
+
+ def SendKeys(self, *values):
+ typing = []
+ for value in values:
+ if isinstance(value, int):
+ value = str(value)
+ for i in range(len(value)):
+ typing.append(value[i])
+ self.ExecuteCommand(Command.SEND_KEYS_TO_ACTIVE_ELEMENT, {'value': typing})
« no previous file with comments | « chrome/test/chromedriver/chrome/web_view_impl.cc ('k') | chrome/test/chromedriver/test/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698