(xpath)
| 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) { |
no outgoing calls
no test coverage detected