MCPcopy Index your code
hub / github.com/seleniumbase/SeleniumBase / activate_html_inspector

Function activate_html_inspector

seleniumbase/fixtures/js_utils.py:805–830  ·  view source on GitHub ↗
(driver)

Source from the content-addressed store, hash-verified

803
804
805def activate_html_inspector(driver):
806 jquery_js = constants.JQuery.MIN_JS
807 html_inspector_js = constants.HtmlInspector.MIN_JS
808
809 if is_html_inspector_activated(driver):
810 return
811 if not is_jquery_activated(driver):
812 add_js_link(driver, jquery_js)
813 wait_for_jquery_active(driver, timeout=1.2)
814 wait_for_ready_state_complete(driver)
815 wait_for_angularjs(driver)
816 add_js_link(driver, html_inspector_js)
817 wait_for_ready_state_complete(driver)
818 wait_for_angularjs(driver)
819
820 for x in range(25):
821 # HTML-Inspector needs a small amount of time to load & activate.
822 try:
823 execute_script(driver, "HTMLInspector;")
824 wait_for_ready_state_complete(driver)
825 wait_for_angularjs(driver)
826 return
827 except Exception:
828 time.sleep(0.1)
829 wait_for_ready_state_complete(driver)
830 wait_for_angularjs(driver)
831
832
833def activate_messenger(driver):

Callers

nothing calls this directly

Calls 8

is_jquery_activatedFunction · 0.85
add_js_linkFunction · 0.85
wait_for_jquery_activeFunction · 0.85
wait_for_angularjsFunction · 0.85
execute_scriptFunction · 0.85
sleepMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…