summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromedriver/element_util.h
diff options
context:
space:
mode:
authorchrisgao@chromium.org <chrisgao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 21:19:47 +0000
committerchrisgao@chromium.org <chrisgao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 21:19:47 +0000
commitf1add5fabba69d248bbccad788dc3955a87e97c9 (patch)
treef2e84e42ecde3ad0171233cebcac21f2244edd38 /chrome/test/chromedriver/element_util.h
parentf57134e200c94ba86e2ee7d44c6427a361c8dd04 (diff)
downloadchromium_src-f1add5fabba69d248bbccad788dc3955a87e97c9.zip
chromium_src-f1add5fabba69d248bbccad788dc3955a87e97c9.tar.gz
chromium_src-f1add5fabba69d248bbccad788dc3955a87e97c9.tar.bz2
[chromedriver] Implement command: sendKeysToElement.
The code for key converter is copied from the old chromedriver. NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11953110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromedriver/element_util.h')
-rw-r--r--chrome/test/chromedriver/element_util.h42
1 files changed, 30 insertions, 12 deletions
diff --git a/chrome/test/chromedriver/element_util.h b/chrome/test/chromedriver/element_util.h
index e0c1357..5315e0a 100644
--- a/chrome/test/chromedriver/element_util.h
+++ b/chrome/test/chromedriver/element_util.h
@@ -19,9 +19,9 @@ class Value;
struct Session;
class Status;
-base::DictionaryValue* CreateElement(const std::string& id);
+base::DictionaryValue* CreateElement(const std::string& element_id);
-// |id| could be null when no root element is given.
+// |root_element_id| could be null when no root element is given.
Status FindElement(
int interval_ms,
bool only_one,
@@ -30,6 +30,19 @@ Status FindElement(
const base::DictionaryValue& params,
scoped_ptr<base::Value>* value);
+Status GetElementAttribute(
+ Session* session,
+ const std::string& element_id,
+ const std::string& attribute_name,
+ scoped_ptr<base::Value>* value);
+
+Status IsElementAttributeEqualToIgnoreCase(
+ Session* session,
+ const std::string& element_id,
+ const std::string& attribute_name,
+ const std::string& attribute_value,
+ bool* is_equal);
+
// |is_clickable| could be null.
// If not null, it's set to indicate whether center of the element is clickable.
Status GetElementClickableLocation(
@@ -40,49 +53,54 @@ Status GetElementClickableLocation(
Status GetElementRegion(
Session* session,
- const std::string& id,
+ const std::string& element_id,
WebRect* rect);
Status GetElementTagName(
Session* session,
- const std::string& id,
+ const std::string& element_id,
std::string* name);
Status GetElementSize(
Session* session,
- const std::string& id,
+ const std::string& element_id,
WebSize* size);
Status IsElementClickable(
Session* session,
- const std::string& id,
+ const std::string& element_id,
WebPoint* location,
bool* is_clickable);
Status IsElementDisplayed(
Session* session,
- const std::string& id,
+ const std::string& element_id,
bool ignore_opacity,
bool* is_displayed);
+Status IsElementEnabled(
+ Session* session,
+ const std::string& element_id,
+ bool* is_enabled);
+
Status IsOptionElementSelected(
Session* session,
- const std::string& id,
+ const std::string& element_id,
bool* is_selected);
Status IsOptionElementTogglable(
Session* session,
- const std::string& id,
+ const std::string& element_id,
bool* is_togglable);
Status SetOptionElementSelected(
Session* session,
- const std::string& id,
+ const std::string& element_id,
bool selected);
Status ToggleOptionElement(
Session* session,
- const std::string& id);
+ const std::string& element_id);
Status ScrollElementIntoView(
Session* session,
@@ -91,7 +109,7 @@ Status ScrollElementIntoView(
Status ScrollElementRegionIntoView(
Session* session,
- const std::string& id,
+ const std::string& element_id,
const WebRect& region,
bool center,
WebPoint* location);