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

Side by Side Diff: chrome/test/webdriver/session.h

Issue 7055004: File upload API in chromedriver (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed according to the code review. Created 9 years, 6 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_
6 #define CHROME_TEST_WEBDRIVER_SESSION_H_ 6 #define CHROME_TEST_WEBDRIVER_SESSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // |value|, which is set only if there is no error. 91 // |value|, which is set only if there is no error.
92 Error* ExecuteAsyncScript(const FrameId& frame_id, 92 Error* ExecuteAsyncScript(const FrameId& frame_id,
93 const std::string& script, 93 const std::string& script,
94 const ListValue* const args, 94 const ListValue* const args,
95 Value** value); 95 Value** value);
96 96
97 // Send the given keys to the given element dictionary. This function takes 97 // Send the given keys to the given element dictionary. This function takes
98 // ownership of |element|. 98 // ownership of |element|.
99 Error* SendKeys(const WebElementId& element, const string16& keys); 99 Error* SendKeys(const WebElementId& element, const string16& keys);
100 100
101 // Sets the file paths to the file upload control under the given location.
102 Error* DragAndDropFilePaths(const gfx::Point& location,
103 const std::vector<std::string>& paths);
104
101 // Clicks the mouse at the given location using the given button. 105 // Clicks the mouse at the given location using the given button.
102 Error* MouseMoveAndClick(const gfx::Point& location, 106 Error* MouseMoveAndClick(const gfx::Point& location,
103 automation::MouseButton button); 107 automation::MouseButton button);
104 Error* MouseMove(const gfx::Point& location); 108 Error* MouseMove(const gfx::Point& location);
105 Error* MouseDrag(const gfx::Point& start, const gfx::Point& end); 109 Error* MouseDrag(const gfx::Point& start, const gfx::Point& end);
106 Error* MouseClick(automation::MouseButton button); 110 Error* MouseClick(automation::MouseButton button);
107 Error* MouseButtonDown(); 111 Error* MouseButtonDown();
108 Error* MouseButtonUp(); 112 Error* MouseButtonUp();
109 Error* MouseDoubleClick(); 113 Error* MouseDoubleClick();
110 114
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 bool* is_visible); 233 bool* is_visible);
230 234
231 // Gets whether the element is currently enabled. 235 // Gets whether the element is currently enabled.
232 Error* IsElementEnabled(const FrameId& frame_id, 236 Error* IsElementEnabled(const FrameId& frame_id,
233 const WebElementId& element, 237 const WebElementId& element,
234 bool* is_enabled); 238 bool* is_enabled);
235 239
236 // Waits for all tabs to stop loading. Returns true on success. 240 // Waits for all tabs to stop loading. Returns true on success.
237 Error* WaitForAllTabsToStopLoading(); 241 Error* WaitForAllTabsToStopLoading();
238 242
243 // Gets the attribute of the given element. If there are no errors, the
244 // function sets |value| and the caller takes ownership.
245 Error* GetAttribute(const WebElementId& element, const std::string& key,
246 Value** value);
247
248 // Gets a clickable location of the given element. It will be the center
249 // location of the element.
250 Error* GetClickableLocation(const WebElementId& element,
251 gfx::Point* location);
252
239 const std::string& id() const; 253 const std::string& id() const;
240 254
241 const FrameId& current_target() const; 255 const FrameId& current_target() const;
242 256
243 void set_async_script_timeout(int timeout_ms); 257 void set_async_script_timeout(int timeout_ms);
244 int async_script_timeout() const; 258 int async_script_timeout() const;
245 259
246 void set_implicit_wait(int timeout_ms); 260 void set_implicit_wait(int timeout_ms);
247 int implicit_wait() const; 261 int implicit_wait() const;
248 262
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 bool has_alert_prompt_text_; 338 bool has_alert_prompt_text_;
325 339
326 DISALLOW_COPY_AND_ASSIGN(Session); 340 DISALLOW_COPY_AND_ASSIGN(Session);
327 }; 341 };
328 342
329 } // namespace webdriver 343 } // namespace webdriver
330 344
331 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); 345 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session);
332 346
333 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ 347 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698