MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / _wait_for_server

Method _wait_for_server

py/selenium/webdriver/remote/server.py:159–167  ·  view source on GitHub ↗
(self, timeout=10)

Source from the content-addressed store, hash-verified

157 self._java_path = java_path
158
159 def _wait_for_server(self, timeout=10):
160 start = time.time()
161 while time.time() - start < timeout:
162 try:
163 urllib.request.urlopen(self.status_url)
164 return True
165 except urllib.error.URLError:
166 time.sleep(0.2)
167 return False
168
169 def download_if_needed(self, version=None):
170 """Download the server if it doesn&#x27;t already exist.

Callers 1

startMethod · 0.95

Calls 1

sleepMethod · 0.65

Tested by

no test coverage detected