{"record":{"id":"d687fd90eec18816","repo":"DioxusLabs/dioxus","slug":"attr-name-attr-value-is-ambiguous-matchi","errorCode":null,"errorMessage":"`{attr_name}={attr_value}` is ambiguous: {} matching elements","messagePattern":"`(.+?)=(.+?)` is ambiguous: (.+?) matching elements","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/oracle/src/renderer.rs","lineNumber":1143,"sourceCode":"            [id] => *id,\n            [] => panic!(\"no live element with tag `{tag}` found in the oracle DOM\"),\n            many => panic!(\n                \"tag `{tag}` is ambiguous: {} matching elements (use element_id_by_attr to disambiguate)\",\n                many.len(),\n            ),\n        }\n    }\n\n    /// Find the live [`ElementId`] of the unique element whose attribute\n    /// `attr_name` (in the default namespace) has the value `attr_value`.\n    /// Panics if zero or more than one element matches.\n    pub fn element_id_by_attr(&self, attr_name: &str, attr_value: &str) -> ElementId {\n        let mut hits = Vec::new();\n        self.collect_element_ids_by_attr(self.arena.root, attr_name, attr_value, &mut hits);\n        match hits.as_slice() {\n            [id] => *id,\n            [] => panic!(\"no live element with `{attr_name}={attr_value}` found in the oracle DOM\"),\n            many => panic!(\n                \"`{attr_name}={attr_value}` is ambiguous: {} matching elements\",\n                many.len(),\n            ),\n        }\n    }\n\n    fn collect_element_ids_by_tag(&self, node: NodeId, tag: &str, out: &mut Vec<ElementId>) {\n        let n = self.arena.node(node);\n        if let NodeKind::Element { tag: t, .. } = &n.kind {\n            if t == tag {\n                if let Some(id) = self.element_id_for_node(node) {\n                    out.push(id);\n                }\n            }\n        }\n        for &child in &n.children {\n            self.collect_element_ids_by_tag(child, tag, out);\n        }","sourceCodeStart":1125,"sourceCodeEnd":1161,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/oracle/src/renderer.rs#L1125-L1161","documentation":"element_id_by_attr found multiple live elements sharing the same attribute name/value pair. Since a unique ElementId is required to fire synthetic events, the ambiguity itself is the test's fault and this panic reports the match count.","triggerScenarios":"Thrown at packages/oracle/src/renderer.rs:1143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The attribute selector matches multiple elements. Narrow the selector so it matches exactly one element."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}