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

Method tab_activate

seleniumbase/undetected/cdp.py:63–74  ·  view source on GitHub ↗
(self, id=None)

Source from the content-addressed store, hash-verified

61 self.wsurl = resp.json()[0]["webSocketDebuggerUrl"]
62
63 def tab_activate(self, id=None):
64 if not id:
65 active_tab = self.tab_list()[0]
66 id = active_tab.id
67 self.wsurl = active_tab.webSocketDebuggerUrl
68 with requests.Session() as session:
69 resp = session.post(
70 self.server_addr + self.endpoints["activate"].format(id=id),
71 headers={"Connection": "close"},
72 timeout=2,
73 )
74 return resp.json()
75
76 def tab_list(self):
77 with requests.Session() as session:

Callers

nothing calls this directly

Calls 2

tab_listMethod · 0.95
postMethod · 0.45

Tested by

no test coverage detected