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

Function add_css_link

seleniumbase/fixtures/js_utils.py:675–687  ·  view source on GitHub ↗
(driver, css_link)

Source from the content-addressed store, hash-verified

673
674
675def add_css_link(driver, css_link):
676 script_to_add_css = """function injectCSS(css) {
677 var head_tag=document.getElementsByTagName("head")[0];
678 var link_tag=document.createElement("link");
679 link_tag.rel="stylesheet";
680 link_tag.type="text/css";
681 link_tag.href=css;
682 link_tag.crossorigin="anonymous";
683 head_tag.appendChild(link_tag);
684 }
685 injectCSS("%s");"""
686 css_link = escape_quotes_if_needed(css_link)
687 execute_script(driver, script_to_add_css % css_link)
688
689
690def add_js_link(driver, js_link):

Callers 2

activate_jquery_confirmFunction · 0.85
activate_messengerFunction · 0.85

Calls 2

escape_quotes_if_neededFunction · 0.85
execute_scriptFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…