(res, locator, prefix, suffix)
| 4597 | } |
| 4598 | |
| 4599 | function assertElementExists(res, locator, prefix, suffix) { |
| 4600 | // if element text is an empty string, just exit this check |
| 4601 | if (typeof res === 'string' && res === '') return |
| 4602 | if (!res || res.length === 0) { |
| 4603 | throw new ElementNotFound(locator, prefix, suffix) |
| 4604 | } |
| 4605 | } |
| 4606 | |
| 4607 | function assertOnlyOneElement(elements, locator, helper) { |
| 4608 | if (elements.length > 1) { |
no outgoing calls
no test coverage detected