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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import sys 5 import sys
6 import platform 6 import platform
7 7
8 import command_executor 8 import command_executor
9 from command_executor import Command 9 from command_executor import Command
10 from webelement import WebElement 10 from webelement import WebElement
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 screen_orientation = self.ExecuteCommand(Command.GET_SCREEN_ORIENTATION) 484 screen_orientation = self.ExecuteCommand(Command.GET_SCREEN_ORIENTATION)
485 return { 485 return {
486 'orientation': screen_orientation['orientation'] 486 'orientation': screen_orientation['orientation']
487 } 487 }
488 488
489 def SetScreenOrientation(self, orientation_type): 489 def SetScreenOrientation(self, orientation_type):
490 params = {'parameters': {'orientation': orientation_type}} 490 params = {'parameters': {'orientation': orientation_type}}
491 self.ExecuteCommand(Command.SET_SCREEN_ORIENTATION, params) 491 self.ExecuteCommand(Command.SET_SCREEN_ORIENTATION, params)
492 492
493 def DeleteScreenOrientationLock(self): 493 def DeleteScreenOrientationLock(self):
494 self.ExecuteCommand(Command.DELETE_SCREEN_ORIENTATION) 494 self.ExecuteCommand(Command.DELETE_SCREEN_ORIENTATION)
495
496 def SendKeys(self, *values):
497 typing = []
498 for value in values:
499 if isinstance(value, int):
500 value = str(value)
501 for i in range(len(value)):
502 typing.append(value[i])
503 self.ExecuteCommand(Command.SEND_KEYS_TO_ACTIVE_ELEMENT, {'value': typing})
OLDNEW
« 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