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

Function script_error_from_exception_details

py/private/_script_handlers.py:204–214  ·  view source on GitHub ↗

Build a :class:`ScriptError` from BiDi ``script.ExceptionDetails``.

(details: dict)

Source from the content-addressed store, hash-verified

202
203
204def script_error_from_exception_details(details: dict) -> ScriptError:
205 """Build a :class:`ScriptError` from BiDi ``script.ExceptionDetails``."""
206 frames = _stack_frames(details.get("stackTrace"))
207 top = frames[0] if frames else {}
208 return ScriptError(
209 message=details.get("text"),
210 source=top.get("url"),
211 line_number=details.get("lineNumber"),
212 column_number=details.get("columnNumber"),
213 stack_trace=_format_stack_trace(details.get("stackTrace")),
214 )
215
216
217def dom_mutation_from_payload(payload: dict) -> DomMutation:

Callers 1

execute_pinnedFunction · 0.85

Calls 4

ScriptErrorClass · 0.90
_stack_framesFunction · 0.85
_format_stack_traceFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected