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

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: Rebase. 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
« no previous file with comments | « chrome/test/chromedriver/status.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
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 """Represents an HTML element."""
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
« no previous file with comments | « chrome/test/chromedriver/status.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698