fix: support accessibility tree refs in upload command (#1156)

* fix: support accessibility tree refs in upload command (#1107)

The upload command only accepted CSS selectors while click/fill supported
accessibility tree refs (e.g. e1, @e1, ref=e1). This resolves the API
inconsistency by reusing resolve_element_object_id for all selector types.

* style: apply cargo fmt

---------

Co-authored-by: hyunjinee <leehj0110@kakao.com>
This commit is contained in:
jin.2
2026-04-05 15:38:49 -05:00
committed by GitHub
co-authored by hyunjinee
parent c47756be9b
commit fcb6615f5a
4 changed files with 128 additions and 42 deletions
+2 -1
View File
@@ -4472,7 +4472,8 @@ async fn handle_upload(cmd: &Value, state: &DaemonState) -> Result<Value, String
})
.unwrap_or_default();
mgr.upload_files(selector, &files).await?;
mgr.upload_files(selector, &files, &state.ref_map, &state.iframe_sessions)
.await?;
Ok(json!({ "uploaded": files.len(), "selector": selector }))
}