OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Swig Interface for PyAuto. | 5 // Swig Interface for PyAuto. |
6 // PyAuto makes the Automation Proxy interface available in Python | 6 // PyAuto makes the Automation Proxy interface available in Python |
7 // | 7 // |
8 // Running swig as: | 8 // Running swig as: |
9 // swig -python -c++ chrome/test/pyautolib/pyautolib.i | 9 // swig -python -c++ chrome/test/pyautolib/pyautolib.i |
10 // would generate pyautolib.py, pyautolib_wrap.cxx | 10 // would generate pyautolib.py, pyautolib_wrap.cxx |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 set_clear_profile; | 213 set_clear_profile; |
214 void set_clear_profile(bool clear_profile); | 214 void set_clear_profile(bool clear_profile); |
215 | 215 |
216 // Navigation Methods | 216 // Navigation Methods |
217 %feature("docstring", "Navigate to the given url in the given tab and given " | 217 %feature("docstring", "Navigate to the given url in the given tab and given " |
218 "window (or active tab in first window if indexes not given). " | 218 "window (or active tab in first window if indexes not given). " |
219 "Note that this method also activates the corresponding tab/window " | 219 "Note that this method also activates the corresponding tab/window " |
220 "if it's not active already. Blocks until page has loaded.") | 220 "if it's not active already. Blocks until page has loaded.") |
221 NavigateToURL; | 221 NavigateToURL; |
222 void NavigateToURL(const char* url_string); | 222 void NavigateToURL(const char* url_string); |
| 223 void NavigateToURL(const char* url_string, int window_index); |
223 void NavigateToURL(const char* url_string, int window_index, int tab_index); | 224 void NavigateToURL(const char* url_string, int window_index, int tab_index); |
224 | 225 |
225 %feature("docstring", "Reload the active tab in the given window (or first " | 226 %feature("docstring", "Reload the active tab in the given window (or first " |
226 "window if index not given). Blocks until page has reloaded.") | 227 "window if index not given). Blocks until page has reloaded.") |
227 ReloadActiveTab; | 228 ReloadActiveTab; |
228 void ReloadActiveTab(int window_index = 0); | 229 void ReloadActiveTab(int window_index = 0); |
229 | 230 |
230 // BrowserProxy methods | 231 // BrowserProxy methods |
231 %feature("docstring", "Apply the accelerator with given id " | 232 %feature("docstring", "Apply the accelerator with given id " |
232 "(IDC_BACK, IDC_NEWTAB ...) to the given or first window. " | 233 "(IDC_BACK, IDC_NEWTAB ...) to the given or first window. " |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 "(window, tab, frame) and return a string.") ExecuteJavascript; | 371 "(window, tab, frame) and return a string.") ExecuteJavascript; |
371 std::wstring ExecuteJavascript(const std::wstring& script, | 372 std::wstring ExecuteJavascript(const std::wstring& script, |
372 int window_index=0, | 373 int window_index=0, |
373 int tab_index=0, | 374 int tab_index=0, |
374 const std::wstring& frame_xpath=""); | 375 const std::wstring& frame_xpath=""); |
375 | 376 |
376 %feature("docstring", "Evaluate a javascript expression in the specified " | 377 %feature("docstring", "Evaluate a javascript expression in the specified " |
377 "(window, tab, frame) and return the specified DOM value " | 378 "(window, tab, frame) and return the specified DOM value " |
378 "as a string. This is a wrapper around " | 379 "as a string. This is a wrapper around " |
379 "window.domAutomationController.send().") GetDOMValue; | 380 "window.domAutomationController.send().") GetDOMValue; |
380 std::wstring GetDOMValue(const std::wstring& expr, | 381 std::wstring GetDOMValue(const std::wstring& expr, |
381 int window_index=0, | 382 int window_index=0, |
382 int tab_index=0, | 383 int tab_index=0, |
383 const std::wstring& frame_xpath=""); | 384 const std::wstring& frame_xpath=""); |
384 | 385 |
385 %feature("docstring", "Resets to the default theme. " | 386 %feature("docstring", "Resets to the default theme. " |
386 "Returns true on success.") ResetToDefaultTheme; | 387 "Returns true on success.") ResetToDefaultTheme; |
387 bool ResetToDefaultTheme(); | 388 bool ResetToDefaultTheme(); |
388 | 389 |
389 }; | 390 }; |
390 | 391 |
OLD | NEW |