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_COMMANDS_TARGET_LOCATOR_COMMANDS_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_ |
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_ | 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/test/webdriver/commands/webdriver_command.h" | 11 #include "chrome/test/webdriver/commands/webdriver_command.h" |
12 | 12 |
13 class DictionaryValue; | 13 class DictionaryValue; |
14 | 14 |
15 namespace webdriver { | 15 namespace webdriver { |
16 | 16 |
17 class Response; | 17 class Response; |
| 18 class WebElementId; |
18 | 19 |
19 // Gets the current window handle. | 20 // Gets the current window handle. |
20 // REST URL: /session/:sessionId/window_handle | 21 // REST URL: /session/:sessionId/window_handle |
21 class WindowHandleCommand : public WebDriverCommand { | 22 class WindowHandleCommand : public WebDriverCommand { |
22 public: | 23 public: |
23 WindowHandleCommand(const std::vector<std::string>& path_segments, | 24 WindowHandleCommand(const std::vector<std::string>& path_segments, |
24 DictionaryValue* parameters); | 25 DictionaryValue* parameters); |
25 virtual ~WindowHandleCommand(); | 26 virtual ~WindowHandleCommand(); |
26 | 27 |
27 virtual bool DoesGet(); | 28 virtual bool DoesGet(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 class SwitchFrameCommand : public WebDriverCommand { | 70 class SwitchFrameCommand : public WebDriverCommand { |
70 public: | 71 public: |
71 SwitchFrameCommand(const std::vector<std::string>& path_segments, | 72 SwitchFrameCommand(const std::vector<std::string>& path_segments, |
72 DictionaryValue* parameters); | 73 DictionaryValue* parameters); |
73 virtual ~SwitchFrameCommand(); | 74 virtual ~SwitchFrameCommand(); |
74 | 75 |
75 virtual bool DoesPost(); | 76 virtual bool DoesPost(); |
76 virtual void ExecutePost(Response* const response); | 77 virtual void ExecutePost(Response* const response); |
77 | 78 |
78 private: | 79 private: |
| 80 bool GetWebElementParameter(const std::string& key, WebElementId* out) const; |
| 81 |
79 DISALLOW_COPY_AND_ASSIGN(SwitchFrameCommand); | 82 DISALLOW_COPY_AND_ASSIGN(SwitchFrameCommand); |
80 }; | 83 }; |
81 | 84 |
82 // Retrieves the active element on the current page. | 85 // Retrieves the active element on the current page. |
83 class ActiveElementCommand : public WebDriverCommand { | 86 class ActiveElementCommand : public WebDriverCommand { |
84 public: | 87 public: |
85 ActiveElementCommand(const std::vector<std::string>& path_segments, | 88 ActiveElementCommand(const std::vector<std::string>& path_segments, |
86 DictionaryValue* parameters); | 89 DictionaryValue* parameters); |
87 virtual ~ActiveElementCommand(); | 90 virtual ~ActiveElementCommand(); |
88 | 91 |
89 virtual bool DoesPost(); | 92 virtual bool DoesPost(); |
90 virtual void ExecutePost(Response* const response); | 93 virtual void ExecutePost(Response* const response); |
91 | 94 |
92 private: | 95 private: |
93 DISALLOW_COPY_AND_ASSIGN(ActiveElementCommand); | 96 DISALLOW_COPY_AND_ASSIGN(ActiveElementCommand); |
94 }; | 97 }; |
95 | 98 |
96 } // namespace webdriver | 99 } // namespace webdriver |
97 | 100 |
98 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_ | 101 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_ |
OLD | NEW |