
Release Notes: - N/A --------- Co-authored-by: michael <michael@zed.dev> Co-authored-by: agus <agus@zed.dev>
1.1 KiB
1.1 KiB
- Added RuntimeCommands import and WebElement to page.py
The changes add an import for
RuntimeCommands
andWebElement
topage.py
. Theexecute_js_script
method is renamed toexecute_script
and enhanced to support execution in the context of a WebElement. The method now usesRuntimeCommands
for script evaluation. - Refactored Runtime-related commands from DomCommands to new RuntimeCommands class
The changes move all Runtime-related command templates and methods from
DomCommands
indom.py
to a newruntime.py
file. This includesEVALUATE_TEMPLATE
,CALL_FUNCTION_ON_TEMPLATE
,GET_PROPERTIES
, and their associated methods. The DomCommands class now uses RuntimeCommands for JavaScript evaluation. - Added Scripts constants and enhanced WebElement functionality
The changes add a new
Scripts
class toconstants.py
containing JavaScript snippets for common operations. Theelement.py
file is significantly enhanced with new methods for script execution, visibility checking, and improved click handling. New exceptions are added toexceptions.py
for better error handling.