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

Side by Side Diff: chrome/test/chromedriver/client/webelement.py

Issue 22263003: [chromedriver] Implement touch down, up, and move commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
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 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 27 matching lines...) Expand all
38 self._Execute(Command.CLEAR_ELEMENT) 38 self._Execute(Command.CLEAR_ELEMENT)
39 39
40 def SendKeys(self, *values): 40 def SendKeys(self, *values):
41 typing = [] 41 typing = []
42 for value in values: 42 for value in values:
43 if isinstance(value, int): 43 if isinstance(value, int):
44 value = str(value) 44 value = str(value)
45 for i in range(len(value)): 45 for i in range(len(value)):
46 typing.append(value[i]) 46 typing.append(value[i])
47 self._Execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing}) 47 self._Execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing})
48
49 def GetLocation(self):
50 return self._Execute(Command.GET_ELEMENT_LOCATION)
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/client/chromedriver.py ('k') | chrome/test/chromedriver/server/http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698