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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 " | 197 %feature("docstring", "Get the timeout (in milli secs) for an automation " |
198 "call") command_execution_timeout_ms; | 198 "call") action_timeout_ms; |
199 int command_execution_timeout_ms() const; | 199 int action_timeout_ms(); |
| 200 |
200 %feature("docstring", "Set the timeout (in milli secs) for an automation " | 201 %feature("docstring", "Set the timeout (in milli secs) for an automation " |
201 "call. This is an internal method. Do not use this directly. " | 202 "call. This is an internal method. Do not use this directly. " |
202 "Use CmdExecutionTimeoutChanger instead") | 203 "Use ActionTimeoutChanger instead") |
203 set_command_execution_timeout_ms; | 204 set_action_timeout_ms; |
204 void set_command_execution_timeout_ms(int timeout); | 205 void set_action_timeout_ms(int timeout); |
| 206 |
| 207 %feature("docstring", "Timeout (in milli secs) for large tests.") |
| 208 large_test_timeout_ms; |
| 209 int large_test_timeout_ms() const; |
205 | 210 |
206 %feature("docstring", "Launches the browser and IPC testing server.") | 211 %feature("docstring", "Launches the browser and IPC testing server.") |
207 LaunchBrowserAndServer; | 212 LaunchBrowserAndServer; |
208 void LaunchBrowserAndServer(); | 213 void LaunchBrowserAndServer(); |
209 %feature("docstring", "Closes the browser and IPC testing server.") | 214 %feature("docstring", "Closes the browser and IPC testing server.") |
210 CloseBrowserAndServer; | 215 CloseBrowserAndServer; |
211 void CloseBrowserAndServer(); | 216 void CloseBrowserAndServer(); |
212 | 217 |
213 %feature("docstring", "Determine if the profile is set to be cleared on " | 218 %feature("docstring", "Determine if the profile is set to be cleared on " |
214 "next startup.") get_clear_profile; | 219 "next startup.") get_clear_profile; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 "string.") InstallExtension; | 369 "string.") InstallExtension; |
365 std::string InstallExtension(const FilePath& crx_file, bool with_ui); | 370 std::string InstallExtension(const FilePath& crx_file, bool with_ui); |
366 | 371 |
367 %feature("docstring", "Get a proxy to the browser window at the given " | 372 %feature("docstring", "Get a proxy to the browser window at the given " |
368 "zero-based index.") GetBrowserWindow; | 373 "zero-based index.") GetBrowserWindow; |
369 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 374 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
370 | 375 |
371 // Meta-method | 376 // Meta-method |
372 %feature("docstring", "Send a sync JSON request to Chrome. " | 377 %feature("docstring", "Send a sync JSON request to Chrome. " |
373 "Returns a JSON dict as a response. " | 378 "Returns a JSON dict as a response. " |
| 379 "Given timeout in milliseconds." |
374 "Internal method.") | 380 "Internal method.") |
375 _SendJSONRequest; | 381 _SendJSONRequest; |
376 std::string _SendJSONRequest(int window_index, const std::string& request); | 382 std::string _SendJSONRequest(int window_index, |
| 383 const std::string& request, |
| 384 int timeout); |
377 | 385 |
378 %feature("docstring", "Execute a string of javascript in the specified " | 386 %feature("docstring", "Execute a string of javascript in the specified " |
379 "(window, tab, frame) and return a string.") ExecuteJavascript; | 387 "(window, tab, frame) and return a string.") ExecuteJavascript; |
380 std::wstring ExecuteJavascript(const std::wstring& script, | 388 std::wstring ExecuteJavascript(const std::wstring& script, |
381 int window_index=0, | 389 int window_index=0, |
382 int tab_index=0, | 390 int tab_index=0, |
383 const std::wstring& frame_xpath=""); | 391 const std::wstring& frame_xpath=""); |
384 | 392 |
385 %feature("docstring", "Evaluate a javascript expression in the specified " | 393 %feature("docstring", "Evaluate a javascript expression in the specified " |
386 "(window, tab, frame) and return the specified DOM value " | 394 "(window, tab, frame) and return the specified DOM value " |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 %feature("docstring", "Get FilePath to the document root") document_root; | 430 %feature("docstring", "Get FilePath to the document root") document_root; |
423 const FilePath& document_root() const; | 431 const FilePath& document_root() const; |
424 | 432 |
425 std::string GetScheme() const; | 433 std::string GetScheme() const; |
426 | 434 |
427 %feature("docstring", "Get URL for a file path") GetURL; | 435 %feature("docstring", "Get URL for a file path") GetURL; |
428 GURL GetURL(const std::string& path) const; | 436 GURL GetURL(const std::string& path) const; |
429 }; | 437 }; |
430 } | 438 } |
431 | 439 |
OLD | NEW |