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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 Error* IsElementDisplayed(const FrameId& frame_id, | 241 Error* IsElementDisplayed(const FrameId& frame_id, |
242 const WebElementId& element, | 242 const WebElementId& element, |
243 bool ignore_opacity, | 243 bool ignore_opacity, |
244 bool* is_visible); | 244 bool* is_visible); |
245 | 245 |
246 // Gets whether the element is currently enabled. | 246 // Gets whether the element is currently enabled. |
247 Error* IsElementEnabled(const FrameId& frame_id, | 247 Error* IsElementEnabled(const FrameId& frame_id, |
248 const WebElementId& element, | 248 const WebElementId& element, |
249 bool* is_enabled); | 249 bool* is_enabled); |
250 | 250 |
251 // Sets the given option element as selected. | 251 // Gets whether the option element is currently selected. |
252 Error* SelectOptionElement(const FrameId& frame_id, | 252 Error* IsOptionElementSelected(const FrameId& frame_id, |
| 253 const WebElementId& element, |
| 254 bool* is_selected); |
| 255 |
| 256 // Set the selection state of the given option element. The option element |
| 257 // must support multi selection if |selected| is false. |
| 258 Error* SetOptionElementSelected(const FrameId& frame_id, |
| 259 const WebElementId& element, |
| 260 bool selected); |
| 261 |
| 262 // Toggles the option element's selection state. The option element should |
| 263 // support multi selection. |
| 264 Error* ToggleOptionElement(const FrameId& frame_id, |
253 const WebElementId& element); | 265 const WebElementId& element); |
254 | 266 |
255 // Gets the tag name of the given element. | 267 // Gets the tag name of the given element. |
256 Error* GetElementTagName(const FrameId& frame_id, | 268 Error* GetElementTagName(const FrameId& frame_id, |
257 const WebElementId& element, | 269 const WebElementId& element, |
258 std::string* tag_name); | 270 std::string* tag_name); |
259 | 271 |
260 // Gets the clickable location of the given element. It will be the center | 272 // Gets the clickable location of the given element. It will be the center |
261 // location of the element. If the element is not clickable, or if the | 273 // location of the element. If the element is not clickable, or if the |
262 // location cannot be determined, an error will be returned. | 274 // location cannot be determined, an error will be returned. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 bool has_alert_prompt_text_; | 383 bool has_alert_prompt_text_; |
372 | 384 |
373 DISALLOW_COPY_AND_ASSIGN(Session); | 385 DISALLOW_COPY_AND_ASSIGN(Session); |
374 }; | 386 }; |
375 | 387 |
376 } // namespace webdriver | 388 } // namespace webdriver |
377 | 389 |
378 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 390 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); |
379 | 391 |
380 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ | 392 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ |
OLD | NEW |