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

Method is_connected

seleniumbase/fixtures/base_case.py:8938–8948  ·  view source on GitHub ↗

Return True if WebDriver is connected to the browser. Note that the stealthy CDP-Driver isn't a WebDriver. In CDP Mode, the CDP-Driver controls the web browser. The CDP-Driver can be connected while WebDriver isn't.

(self)

Source from the content-addressed store, hash-verified

8936 return self.execute_script("return navigator.onLine;")
8937
8938 def is_connected(self):
8939 """
8940 Return True if WebDriver is connected to the browser.
8941 Note that the stealthy CDP-Driver isn't a WebDriver.
8942 In CDP Mode, the CDP-Driver controls the web browser.
8943 The CDP-Driver can be connected while WebDriver isn't.
8944 """
8945 if hasattr(self.driver, "is_connected"):
8946 return self.driver.is_connected()
8947 else:
8948 return True
8949
8950 def is_chromium(self):
8951 """Return True if the browser is Chrome or Edge."""

Callers 5

activate_cdp_modeMethod · 0.95
assert_textMethod · 0.95
is_cdp_swap_neededFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected