Bug 1519055 - Set window handle for 'switch_to_window' also as 'handle'. r=whimboo
authorKriti Singh <kritisingh1.ks@gmail.com>
Thu, 14 Mar 2019 20:13:12 +0000
changeset 524945 d266414d9c66f4c3aa758b0879d1603e74282554
parent 524944 db4a1fa6c07c86aeee7415dfd4498e5ddc74ffd3
child 524946 24870321bdeb499feac832ecbc165d7bd949b00b
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1519055
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519055 - Set window handle for 'switch_to_window' also as 'handle'. r=whimboo Differential Revision: https://phabricator.services.mozilla.com/D23526
testing/marionette/client/marionette_driver/marionette.py
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -1338,28 +1338,28 @@ class Marionette(object):
         ::
 
             alert = self.marionette.switch_to_alert()
             text = alert.text
             alert.accept()
         """
         return Alert(self)
 
-    def switch_to_window(self, window_id, focus=True):
+    def switch_to_window(self, handle, focus=True):
         """Switch to the specified window; subsequent commands will be
         directed at the new window.
 
-        :param window_id: The id or name of the window to switch to.
+        :param handle: The id or name of the window to switch to.
 
         :param focus: A boolean value which determins whether to focus
             the window that we just switched to.
         """
         self._send_message("WebDriver:SwitchToWindow",
-                           {"focus": focus, "name": window_id})
-        self.window = window_id
+                           {"focus": focus, "name": handle, "handle": handle})
+        self.window = handle
 
     def get_active_frame(self):
         """Returns an :class:`~marionette_driver.marionette.HTMLElement`
         representing the frame Marionette is currently acting on."""
         return self._send_message("WebDriver:GetActiveFrame",
                                   key="value")
 
     def switch_to_default_content(self):