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 from command_executor import Command | 5 from command_executor import Command |
6 | 6 |
7 | 7 |
8 class WebElement(object): | 8 class WebElement(object): |
9 """Represents an HTML element.""" | 9 """Represents an HTML element.""" |
10 def __init__(self, chromedriver, id_): | 10 def __init__(self, chromedriver, id_): |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 typing = [] | 44 typing = [] |
45 for value in values: | 45 for value in values: |
46 if isinstance(value, int): | 46 if isinstance(value, int): |
47 value = str(value) | 47 value = str(value) |
48 for i in range(len(value)): | 48 for i in range(len(value)): |
49 typing.append(value[i]) | 49 typing.append(value[i]) |
50 self._Execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing}) | 50 self._Execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing}) |
51 | 51 |
52 def GetLocation(self): | 52 def GetLocation(self): |
53 return self._Execute(Command.GET_ELEMENT_LOCATION) | 53 return self._Execute(Command.GET_ELEMENT_LOCATION) |
| 54 |
| 55 def IsDisplayed(self): |
| 56 return self._Execute(Command.IS_ELEMENT_DISPLAYED) |
OLD | NEW |