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

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

Issue 11884058: [chromedriver] Implement commands: findChildElement, findChildElements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 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
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
kkania 2013/01/16 19:45:10 2013
chrisgao (Use stgao instead) 2013/01/16 20:08:20 Done.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 class WebElement(object):
6 """Reperents an HTML element."""
kkania 2013/01/16 19:45:10 Represents
chrisgao (Use stgao instead) 2013/01/16 20:08:20 Done.
7 def __init__(self, chromedriver, id_):
8 self._chromedriver = chromedriver
9 self._id = id_
10
11 def _Execute(self, command, params=None):
12 if params is None:
13 params = {}
14 params['id'] = self._id;
15 return self._chromedriver.ExecuteSessionCommand(command, params)
16
17 def FindElement(self, strategy, target):
18 return self._Execute(
19 'findChildElement', {'using': strategy, 'value': target})
20
21 def FindElements(self, strategy, target):
22 return self._Execute(
23 'findChildElements', {'using': strategy, 'value': target})
OLDNEW
« chrome/test/chromedriver/commands_unittest.cc ('K') | « chrome/test/chromedriver/status.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698