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

Unified Diff: chrome/test/webdriver/session.h

Issue 7465053: In chromedriver, check if an element is clickable before clicking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | chrome/test/webdriver/session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/session.h
diff --git a/chrome/test/webdriver/session.h b/chrome/test/webdriver/session.h
index 9e0b595572217823afff635f1644c901448f873c..a71c8175dbc2a1f673c277704657fd8d3ac34f15 100644
--- a/chrome/test/webdriver/session.h
+++ b/chrome/test/webdriver/session.h
@@ -202,11 +202,14 @@ class Session {
// Scroll the element's region into view and get its location relative to
// the client's viewport. If |center| is true, the element will be centered
- // if it is too big to fit in view.
+ // if it is too big to fit in view. If |verify_clickable_at_middle| is true,
+ // an error will be returned if the element is not clickable in the middle
+ // of the given region.
Error* GetElementRegionInView(
const WebElementId& element,
const gfx::Rect& region,
bool center,
+ bool verify_clickable_at_middle,
gfx::Point* location);
// Gets the size of the element from the given window and frame, even if
@@ -314,11 +317,17 @@ class Session {
const std::string& query,
bool find_one,
std::vector<WebElementId>* elements);
+ // Returns an error if the element is not clickable.
+ Error* VerifyElementIsClickable(
+ const FrameId& frame_id,
+ const WebElementId& element,
+ const gfx::Point& location);
Error* GetElementRegionInViewHelper(
const FrameId& frame_id,
const WebElementId& element,
const gfx::Rect& region,
bool center,
+ bool verify_clickable_at_middle,
gfx::Point* location);
const std::string id_;
« no previous file with comments | « DEPS ('k') | chrome/test/webdriver/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698