(xpath)
| 13 | * Find element by XPath |
| 14 | */ |
| 15 | export function findElement(xpath) { |
| 16 | try { |
| 17 | const result = document.evaluate( |
| 18 | xpath, |
| 19 | document, |
| 20 | null, |
| 21 | XPathResult.FIRST_ORDERED_NODE_TYPE, |
| 22 | null |
| 23 | ); |
| 24 | return result.singleNodeValue; |
| 25 | } catch (e) { |
| 26 | console.error('XPath evaluation error:', e); |
| 27 | return null; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Check if element is visible to user |
nothing calls this directly
no outgoing calls
no test coverage detected