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

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

Issue 6723004: ChromeDriver should be able to focus on a frame using its frame element, (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 9 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // |GetWindowIds| or the name attribute of a DOM window. 111 // |GetWindowIds| or the name attribute of a DOM window.
112 ErrorCode SwitchToWindow(const std::string& name); 112 ErrorCode SwitchToWindow(const std::string& name);
113 113
114 // Switches the frame used by default. |name_or_id| is either the name or id 114 // Switches the frame used by default. |name_or_id| is either the name or id
115 // of a frame element. 115 // of a frame element.
116 ErrorCode SwitchToFrameWithNameOrId(const std::string& name_or_id); 116 ErrorCode SwitchToFrameWithNameOrId(const std::string& name_or_id);
117 117
118 // Switches the frame used by default. |index| is the zero-based frame index. 118 // Switches the frame used by default. |index| is the zero-based frame index.
119 ErrorCode SwitchToFrameWithIndex(int index); 119 ErrorCode SwitchToFrameWithIndex(int index);
120 120
121 // Switches to the frame identified by the given |element|. The element must
122 // be either an IFRAME or FRAME element.
123 ErrorCode SwitchToFrameWithElement(const WebElementId& element);
124
121 // Switches the frame used by default to the topmost frame. 125 // Switches the frame used by default to the topmost frame.
122 void SwitchToTopFrame(); 126 void SwitchToTopFrame();
123 127
124 // Closes the current window. Returns true on success. 128 // Closes the current window. Returns true on success.
125 // Note: The session will be deleted if this closes the last window in the 129 // Note: The session will be deleted if this closes the last window in the
126 // session. 130 // session.
127 bool CloseWindow(); 131 bool CloseWindow();
128 132
129 // Gets the version of the running browser. 133 // Gets the version of the running browser.
130 std::string GetVersion(); 134 std::string GetVersion();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 FrameId current_target_; 225 FrameId current_target_;
222 226
223 DISALLOW_COPY_AND_ASSIGN(Session); 227 DISALLOW_COPY_AND_ASSIGN(Session);
224 }; 228 };
225 229
226 } // namespace webdriver 230 } // namespace webdriver
227 231
228 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); 232 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session);
229 233
230 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ 234 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698