MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / switch_to_tab

Method switch_to_tab

seleniumbase/fixtures/base_case.py:9704–9709  ·  view source on GitHub ↗

Same as self.switch_to_window() Switches control of the browser to the specified window. The window can be an integer: 0 -> 1st tab, 1 -> 2nd tab, etc... Or it can be a list item from self.driver.window_handles

(self, tab, timeout=None)

Source from the content-addressed store, hash-verified

9702 self.open_new_window(switch_to=switch_to, **kwargs)
9703
9704 def switch_to_tab(self, tab, timeout=None):
9705 """Same as self.switch_to_window()
9706 Switches control of the browser to the specified window.
9707 The window can be an integer: 0 -> 1st tab, 1 -> 2nd tab, etc...
9708 Or it can be a list item from self.driver.window_handles """
9709 self.switch_to_window(window=tab, timeout=timeout)
9710
9711 def switch_to_default_tab(self):
9712 """Same as self.switch_to_default_window()"""

Callers 1

switch_to_windowMethod · 0.45

Calls 1

switch_to_windowMethod · 0.95

Tested by

no test coverage detected