MCPcopy
hub / github.com/plotly/dash / get_logs

Method get_logs

dash/testing/browser.py:619–635  ·  view source on GitHub ↗

Return a list of `SEVERE` level logs after last reset time stamps (default to 0, resettable by `reset_log_timestamp`. Chrome only

(self)

Source from the content-addressed store, hash-verified

617 ).click().perform()
618
619 def get_logs(self):
620 """Return a list of `SEVERE` level logs after last reset time stamps
621 (default to 0, resettable by `reset_log_timestamp`.
622
623 Chrome only
624 """
625 if self._browser == "chrome":
626 return [
627 entry
628 for entry in self.driver.get_log("browser")
629 if entry["timestamp"] > self._last_ts
630 ]
631 warnings.warn(
632 "get_logs always return None with webdrivers other than Chrome",
633 stacklevel=2,
634 )
635 return None
636
637 def reset_log_timestamp(self):
638 """reset_log_timestamp only work with chrome webdriver."""

Calls

no outgoing calls