MCPcopy Create free account
hub / github.com/InverseUI/InverseUI-Recorder / findElement

Method findElement

util/dom_utils.js:357–371  ·  view source on GitHub ↗
(xpath)

Source from the content-addressed store, hash-verified

355
356 // Find element by XPath
357 findElement(xpath) {
358 try {
359 const result = document.evaluate(
360 xpath,
361 document,
362 null,
363 XPathResult.FIRST_ORDERED_NODE_TYPE,
364 null
365 );
366 return result.singleNodeValue;
367 } catch (e) {
368 console.error('XPath evaluation error:', e);
369 return null;
370 }
371 }
372
373 // Assert element conditions
374 assertElement(xpath, assertion) {

Callers 4

assertElementMethod · 0.95
getElementValueMethod · 0.95
getElementPropertiesMethod · 0.95
checkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected