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

Function external_spec_urls

scripts/update_cddl.py:208–216  ·  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

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

Callers 1

mainFunction · 0.85

Calls 2

splitMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected