{"record":{"id":"cb365844390f674a","repo":"DioxusLabs/dioxus","slug":"no-live-element-with-attr-name-attr-value-fo","errorCode":null,"errorMessage":"no live element with `{attr_name}={attr_value}` found in the oracle DOM","messagePattern":"no live element with `(.+?)=(.+?)` found in the oracle DOM","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/oracle/src/renderer.rs","lineNumber":1142,"sourceCode":"        match hits.as_slice() {\n            [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);","sourceCodeStart":1124,"sourceCodeEnd":1160,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/oracle/src/renderer.rs#L1124-L1160","documentation":"`element_id_by_attr` searches the oracle DOM for the unique element whose attribute matches; it panics when zero elements match (the ambiguity case with >1 raises a separate error). It fires when the test/query references an attribute=value pair that doesn't exist on any live element, typically a typo or an element that was never rendered.","triggerScenarios":"Thrown at packages/oracle/src/renderer.rs:1142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No live element has that attribute/value pair. Ensure the element with the attribute is rendered before querying."],"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"}