diff options
author | dtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-24 01:09:52 +0000 |
---|---|---|
committer | dtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-24 01:09:52 +0000 |
commit | fa1c9194d47a9ff3934bc72ca72b6a2b13e42204 (patch) | |
tree | b52c47fd38bedb1095899092797af1511a277c48 /chrome/test/pyautolib | |
parent | 9942353255edc864122ef53a4a316050a6f01e18 (diff) | |
download | chromium_src-fa1c9194d47a9ff3934bc72ca72b6a2b13e42204.zip chromium_src-fa1c9194d47a9ff3934bc72ca72b6a2b13e42204.tar.gz chromium_src-fa1c9194d47a9ff3934bc72ca72b6a2b13e42204.tar.bz2 |
Add window index parameter to LaunchApp() PyAuto call.
BUG=None.
TEST=Manual.
Review URL: http://codereview.chromium.org/7236019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rw-r--r-- | chrome/test/pyautolib/pyauto.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 6739a47..4dc0767 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -2601,7 +2601,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): """ return self.UninstallExtensionById(app_id) - def LaunchApp(self, app_id): + def LaunchApp(self, app_id, windex=0): """Opens the New Tab Page and launches the specified app from it. This method will not return until after the contents of a new tab for the @@ -2609,16 +2609,18 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): Args: app_id: The string ID of the app to launch. + windex: The index of the browser window to work on. Defaults to 0 (the + first window). Raises: pyauto_errors.JSONInterfaceError if the automation call returns an error. """ - self.AppendTab(GURL('chrome://newtab')) # Also activates this tab. + self.AppendTab(GURL('chrome://newtab'), windex) # Also activates this tab. cmd_dict = { 'command': 'LaunchApp', 'id': app_id, } - return self._GetResultFromJSONRequest(cmd_dict) + return self._GetResultFromJSONRequest(cmd_dict, windex=windex) def SetAppLaunchType(self, app_id, launch_type, windex=0): """Sets the launch type for the specified app. |