iframes support (#405)

Co-authored-by: Aleksei Zarubin <12220926+alexzarbn@users.noreply.github.com>
This commit is contained in:
LawyZheng 2024-06-06 10:07:32 +08:00 committed by GitHub
parent 064c831524
commit 285419349c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 207 additions and 51 deletions

View file

@ -308,6 +308,7 @@ with visualizer_tab:
tab_screenshot,
tab_post_action_screenshot,
tab_id_to_xpath,
tab_id_to_frame,
tab_element_tree,
tab_element_tree_trimmed,
tab_llm_prompt,
@ -323,6 +324,7 @@ with visualizer_tab:
":rainbow[Screenshot]",
":rainbow[Action Screenshots]",
":red[ID -> XPath]",
":red[ID -> Frame]",
":orange[Element Tree]",
":blue[Element Tree (Trimmed)]",
":yellow[LLM Prompt]",
@ -422,6 +424,13 @@ with visualizer_tab:
read_artifact_safe(uri),
"No ID -> XPath map available.",
)
elif file_name.endswith("id_frame_map.json"):
streamlit_content_safe(
tab_id_to_frame,
tab_id_to_frame.json,
read_artifact_safe(uri),
"No ID -> Frame map available.",
)
elif file_name.endswith("tree.json"):
streamlit_content_safe(
tab_element_tree,