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

Function external_spec_urls

scripts/update_cddl.py:207–215  ·  view source on GitHub ↗

The specs the rendered core spec's "External specifications" section links to, without fragments.

(spec_html)

Source from the content-addressed store, hash-verified

205
206
207def external_spec_urls(spec_html):
208 """The specs the rendered core spec's "External specifications" section links to, without fragments."""
209 section = re.search(r'id="external-specifications".*?<ol>(.*?)</ol>', spec_html, re.DOTALL)
210 if not section:
211 raise RuntimeError("Could not find the External specifications list in the rendered WebDriver BiDi spec")
212 urls = [href.split("#")[0] for href in re.findall(r'href="(https?://[^"]+)"', section.group(1))]
213 if not urls:
214 raise RuntimeError("The External specifications list in the rendered WebDriver BiDi spec has no links")
215 return urls
216
217
218def spec_urls(entry):

Callers 1

mainFunction · 0.85

Calls 2

splitMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected