OLD | NEW |
---|---|
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 Loading... | |
91 // |value|. | 91 // |value|. |
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 Loading... | |
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. | |
kkania
2011/06/01 16:16:41
Mention that this sets |value| on no error and the
nodchip
2011/06/02 07:15:53
Done.
| |
244 Error* GetAttribute(const WebElementId& element, const std::string& key, | |
245 Value** value); | |
246 | |
247 // Gets a clickable location of the given element. It will be the center | |
248 // location of the element. | |
249 Error* GetClickableLocation(const WebElementId& element, | |
250 gfx::Point* location); | |
251 | |
239 const std::string& id() const; | 252 const std::string& id() const; |
240 | 253 |
241 const FrameId& current_target() const; | 254 const FrameId& current_target() const; |
242 | 255 |
243 void set_async_script_timeout(int timeout_ms); | 256 void set_async_script_timeout(int timeout_ms); |
244 int async_script_timeout() const; | 257 int async_script_timeout() const; |
245 | 258 |
246 void set_implicit_wait(int timeout_ms); | 259 void set_implicit_wait(int timeout_ms); |
247 int implicit_wait() const; | 260 int implicit_wait() const; |
248 | 261 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 bool has_alert_prompt_text_; | 337 bool has_alert_prompt_text_; |
325 | 338 |
326 DISALLOW_COPY_AND_ASSIGN(Session); | 339 DISALLOW_COPY_AND_ASSIGN(Session); |
327 }; | 340 }; |
328 | 341 |
329 } // namespace webdriver | 342 } // namespace webdriver |
330 | 343 |
331 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 344 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); |
332 | 345 |
333 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ | 346 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ |
OLD | NEW |