| OLD | NEW |
| 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 Loading... |
| 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}) |
| OLD | NEW |