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:325–335  ·  view source on GitHub ↗

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

(details: dict)

Source from the content-addressed store, hash-verified

323
324
325def script_error_from_exception_details(details: dict) -> ScriptError:
326 """Build a :class:`ScriptError` from BiDi ``script.ExceptionDetails``."""
327 frames = _stack_frames(details.get("stackTrace"))
328 top = frames[0] if frames else {}
329 return ScriptError(
330 message=details.get("text"),
331 source=top.get("url"),
332 line_number=details.get("lineNumber"),
333 column_number=details.get("columnNumber"),
334 stack_trace=_format_stack_trace(details.get("stackTrace")),
335 )
336
337
338def dom_mutation_from_payload(payload: dict) -> DomMutation:

Callers 1

execute_pinnedFunction · 0.85

Calls 4

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

Tested by

no test coverage detected