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

Method get_active_tab

seleniumbase/core/sb_cdp.py:1403–1409  ·  view source on GitHub ↗

Return the active tab. The active tab is the one currenly controlled by CDP. The active tab MIGHT NOT be the currently visible tab! (If a page opens a new tab, the new tab WON'T be active) To switch the active tab, call: sb.switch_to_tab(tab)

(self)

Source from the content-addressed store, hash-verified

1401 return self.loop.run_until_complete(self.page.close())
1402
1403 def get_active_tab(self):
1404 """Return the active tab.
1405 The active tab is the one currenly controlled by CDP.
1406 The active tab MIGHT NOT be the currently visible tab!
1407 (If a page opens a new tab, the new tab WON'T be active)
1408 To switch the active tab, call: sb.switch_to_tab(tab)"""
1409 return self.page
1410
1411 def get_tabs(self):
1412 driver = self.driver

Callers 7

get_websocket_urlMethod · 0.95
raw_cdp_mobile.pyFile · 0.80
raw_ad_blocking.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected