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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 virtual void SetUp(); | 187 virtual void SetUp(); |
188 %feature("docstring", | 188 %feature("docstring", |
189 "Closes all windows and destroys the browser.") TearDown; | 189 "Closes all windows and destroys the browser.") TearDown; |
190 virtual void TearDown(); | 190 virtual void TearDown(); |
191 | 191 |
192 %feature("docstring", "Timeout (in milli secs) for an action. " | 192 %feature("docstring", "Timeout (in milli secs) for an action. " |
193 "This value is also used as default for the WaitUntil() method.") | 193 "This value is also used as default for the WaitUntil() method.") |
194 action_max_timeout_ms; | 194 action_max_timeout_ms; |
195 int action_max_timeout_ms() const; | 195 int action_max_timeout_ms() const; |
196 | 196 |
197 %feature("docstring", "Get the timeout (in milli secs) for an automation " | |
198 "call") command_execution_timeout_ms; | |
199 int command_execution_timeout_ms() const; | |
200 %feature("docstring", "Set the timeout (in milli secs) for an automation " | |
201 "call. This is an internal method. Do not use this directly. " | |
202 "Use CmdExecutionTimeoutChanger instead") | |
203 set_command_execution_timeout_ms; | |
204 void set_command_execution_timeout_ms(int timeout); | |
205 | |
206 %feature("docstring", "Launches the browser and IPC testing server.") | 197 %feature("docstring", "Launches the browser and IPC testing server.") |
207 LaunchBrowserAndServer; | 198 LaunchBrowserAndServer; |
208 void LaunchBrowserAndServer(); | 199 void LaunchBrowserAndServer(); |
209 %feature("docstring", "Closes the browser and IPC testing server.") | 200 %feature("docstring", "Closes the browser and IPC testing server.") |
210 CloseBrowserAndServer; | 201 CloseBrowserAndServer; |
211 void CloseBrowserAndServer(); | 202 void CloseBrowserAndServer(); |
212 | 203 |
213 %feature("docstring", "Determine if the profile is set to be cleared on " | 204 %feature("docstring", "Determine if the profile is set to be cleared on " |
214 "next startup.") get_clear_profile; | 205 "next startup.") get_clear_profile; |
215 bool get_clear_profile() const; | 206 bool get_clear_profile() const; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 "zero-based index.") GetBrowserWindow; | 358 "zero-based index.") GetBrowserWindow; |
368 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 359 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
369 | 360 |
370 // Meta-method | 361 // Meta-method |
371 %feature("docstring", "Send a sync JSON request to Chrome. " | 362 %feature("docstring", "Send a sync JSON request to Chrome. " |
372 "Returns a JSON dict as a response. " | 363 "Returns a JSON dict as a response. " |
373 "Internal method.") | 364 "Internal method.") |
374 _SendJSONRequest; | 365 _SendJSONRequest; |
375 std::string _SendJSONRequest(int window_index, const std::string& request); | 366 std::string _SendJSONRequest(int window_index, const std::string& request); |
376 | 367 |
| 368 // Meta-method |
| 369 %feature("docstring", "Send a sync JSON request to Chrome. " |
| 370 "Returns a JSON dict as a response. " |
| 371 "Internal method.") |
| 372 _SendJSONRequest; |
| 373 std::string _SendJSONRequest(int window_index, |
| 374 const std::string& request, |
| 375 int timeout); |
| 376 |
377 %feature("docstring", "Execute a string of javascript in the specified " | 377 %feature("docstring", "Execute a string of javascript in the specified " |
378 "(window, tab, frame) and return a string.") ExecuteJavascript; | 378 "(window, tab, frame) and return a string.") ExecuteJavascript; |
379 std::wstring ExecuteJavascript(const std::wstring& script, | 379 std::wstring ExecuteJavascript(const std::wstring& script, |
380 int window_index=0, | 380 int window_index=0, |
381 int tab_index=0, | 381 int tab_index=0, |
382 const std::wstring& frame_xpath=""); | 382 const std::wstring& frame_xpath=""); |
383 | 383 |
384 %feature("docstring", "Evaluate a javascript expression in the specified " | 384 %feature("docstring", "Evaluate a javascript expression in the specified " |
385 "(window, tab, frame) and return the specified DOM value " | 385 "(window, tab, frame) and return the specified DOM value " |
386 "as a string. This is a wrapper around " | 386 "as a string. This is a wrapper around " |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 %feature("docstring", "Get FilePath to the document root") document_root; | 421 %feature("docstring", "Get FilePath to the document root") document_root; |
422 const FilePath& document_root() const; | 422 const FilePath& document_root() const; |
423 | 423 |
424 std::string GetScheme() const; | 424 std::string GetScheme() const; |
425 | 425 |
426 %feature("docstring", "Get URL for a file path") GetURL; | 426 %feature("docstring", "Get URL for a file path") GetURL; |
427 GURL GetURL(const std::string& path) const; | 427 GURL GetURL(const std::string& path) const; |
428 }; | 428 }; |
429 } | 429 } |
430 | 430 |
OLD | NEW |