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

Unified Diff: chrome/test/pyautolib/pyautolib.i

Issue 3012039: Add ExecuteJavascript() method to PyUITestBase (Closed)
Patch Set: merge to head Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« chrome/test/pyautolib/pyautolib.h ('K') | « chrome/test/pyautolib/pyautolib.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyautolib.i
diff --git a/chrome/test/pyautolib/pyautolib.i b/chrome/test/pyautolib/pyautolib.i
index a1c4d64568f3819f457b1fe9b951d89dfc96a667..b5fd1a555e1ee9e0b17d188fe2187fb7b524d979 100644
--- a/chrome/test/pyautolib/pyautolib.i
+++ b/chrome/test/pyautolib/pyautolib.i
@@ -154,6 +154,7 @@ class TabProxy {
%feature("docstring", "Cancel authentication to a login prompt. ")
CancelAuth;
bool CancelAuth();
+
};
class PyUITestSuiteBase {
@@ -347,6 +348,22 @@ class PyUITestBase {
_SendJSONRequest;
std::string _SendJSONRequest(int window_index, std::string request);
+ %feature("docstring", "Execute a string of javascript in the specified "
+ "(window, tab, frame) and return a string.") ExecuteJavascript;
+ std::wstring ExecuteJavascript(const std::wstring& script,
+ int window_index=0,
+ int tab_index=0,
+ const std::wstring& frame_xpath="");
+
+ %feature("docstring", "Evaluate a javascript expression in the specified "
+ "(window, tab, frame) and return the specified DOM value "
+ "as a string. This is a wrapper around "
+ "window.domAutomationController.send().") GetDOMValue;
+ std::wstring GetDOMValue(const std::wstring& expr,
+ int window_index=0,
+ int tab_index=0,
+ const std::wstring& frame_xpath="");
+
%feature("docstring", "Resets to the default theme. "
"Returns true on success.") ResetToDefaultTheme;
bool ResetToDefaultTheme();
« chrome/test/pyautolib/pyautolib.h ('K') | « chrome/test/pyautolib/pyautolib.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698