MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / fetch_service_accessibility_tree

Function fetch_service_accessibility_tree

packages/server/src/main.rs:5638–5662  ·  view source on GitHub ↗
(
    udid: &str,
    source: AccessibilitySource,
    max_depth: Option<usize>,
    include_hidden: bool,
    interactive_only: bool,
    server_url: &str,
)

Source from the content-addressed store, hash-verified

5636}
5637
5638fn fetch_service_accessibility_tree(
5639 udid: &str,
5640 source: AccessibilitySource,
5641 max_depth: Option<usize>,
5642 include_hidden: bool,
5643 interactive_only: bool,
5644 server_url: &str,
5645) -> anyhow::Result<Value> {
5646 let mut query = vec![format!("source={}", source.as_query_value())];
5647 if let Some(max_depth) = max_depth {
5648 query.push(format!("maxDepth={}", max_depth.min(80)));
5649 }
5650 if include_hidden {
5651 query.push("includeHidden=true".to_owned());
5652 }
5653 if interactive_only {
5654 query.push("interactiveOnly=true".to_owned());
5655 }
5656 let path = format!(
5657 "/api/simulators/{}/accessibility-tree?{}",
5658 url_path_component(udid),
5659 query.join("&")
5660 );
5661 http_get_json(server_url, &path)
5662}
5663
5664fn fetch_service_accessibility_point(
5665 udid: &str,

Callers 1

describe_ui_snapshotFunction · 0.85

Calls 1

http_get_jsonFunction · 0.85

Tested by

no test coverage detected