1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

WebContent+Friends: Add IPC and plumbing for WebDriver endpoint

To use the `GET /session/{id}/element/{id}/css/{property name}`
WebDriver endpoint, two new IPC calls through the Browser are
implemented:
    - get_active_documents_type returns the type of the active document,
      which is either "xml" or "html"
    - get_computed_value_for_element returns the computed CSS value (as
      String) for the given element and CSS property name
This commit is contained in:
Tobias Christiansen 2022-10-20 12:02:47 +02:00 committed by Linus Groh
parent eda566d112
commit 202b2be1f2
7 changed files with 70 additions and 0 deletions

View file

@ -41,6 +41,8 @@ endpoint WebContentServer
query_selector_all(i32 start_node_id, String selector) => (Optional<Vector<i32>> elements_ids)
get_element_attribute(i32 element_id, String name) => (Optional<String> attribute)
get_element_property(i32 element_id, String name) => (Optional<String> property)
get_active_documents_type() => (String type)
get_computed_value_for_element(i32 element_id, String property_name) => (String computed_value)
run_javascript(String js_source) =|