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

Side by Side Diff: chrome/test/chromedriver/client/chromedriver.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
« no previous file with comments | « no previous file | chrome/test/chromedriver/client/webelement.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 command_executor 5 import command_executor
6 from command_executor import Command 6 from command_executor import Command
7 from webelement import WebElement 7 from webelement import WebElement
8 8
9 9
10 class ChromeDriverException(Exception): 10 class ChromeDriverException(Exception):
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 def MouseButtonDown(self, button=0): 211 def MouseButtonDown(self, button=0):
212 self.ExecuteCommand(Command.MOUSE_BUTTON_DOWN, {'button': button}) 212 self.ExecuteCommand(Command.MOUSE_BUTTON_DOWN, {'button': button})
213 213
214 def MouseButtonUp(self, button=0): 214 def MouseButtonUp(self, button=0):
215 self.ExecuteCommand(Command.MOUSE_BUTTON_UP, {'button': button}) 215 self.ExecuteCommand(Command.MOUSE_BUTTON_UP, {'button': button})
216 216
217 def MouseDoubleClick(self, button=0): 217 def MouseDoubleClick(self, button=0):
218 self.ExecuteCommand(Command.MOUSE_DOUBLE_CLICK, {'button': button}) 218 self.ExecuteCommand(Command.MOUSE_DOUBLE_CLICK, {'button': button})
219 219
220 def TouchDown(self, x, y):
221 self.ExecuteCommand(Command.TOUCH_DOWN, {'x': x, 'y': y})
222
223 def TouchUp(self, x, y):
224 self.ExecuteCommand(Command.TOUCH_UP, {'x': x, 'y': y})
225
226 def TouchMove(self, x, y):
227 self.ExecuteCommand(Command.TOUCH_MOVE, {'x': x, 'y': y})
228
220 def GetCookies(self): 229 def GetCookies(self):
221 return self.ExecuteCommand(Command.GET_COOKIES) 230 return self.ExecuteCommand(Command.GET_COOKIES)
222 231
223 def AddCookie(self, cookie): 232 def AddCookie(self, cookie):
224 self.ExecuteCommand(Command.ADD_COOKIE, {'cookie': cookie}) 233 self.ExecuteCommand(Command.ADD_COOKIE, {'cookie': cookie})
225 234
226 def DeleteCookie(self, name): 235 def DeleteCookie(self, name):
227 self.ExecuteCommand(Command.DELETE_COOKIE, {'name': name}) 236 self.ExecuteCommand(Command.DELETE_COOKIE, {'name': name})
228 237
229 def DeleteAllCookies(self): 238 def DeleteAllCookies(self):
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 self.ExecuteCommand( 274 self.ExecuteCommand(
266 Command.SET_WINDOW_SIZE, 275 Command.SET_WINDOW_SIZE,
267 {'windowHandle': 'current', 'width': width, 'height': height}) 276 {'windowHandle': 'current', 'width': width, 'height': height})
268 277
269 def MaximizeWindow(self): 278 def MaximizeWindow(self):
270 self.ExecuteCommand(Command.MAXIMIZE_WINDOW, {'windowHandle': 'current'}) 279 self.ExecuteCommand(Command.MAXIMIZE_WINDOW, {'windowHandle': 'current'})
271 280
272 def Quit(self): 281 def Quit(self):
273 """Quits the browser and ends the session.""" 282 """Quits the browser and ends the session."""
274 self.ExecuteCommand(Command.QUIT) 283 self.ExecuteCommand(Command.QUIT)
OLDNEW
« no previous file with comments | « no previous file | chrome/test/chromedriver/client/webelement.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698