* {{> grabNumberOfVisibleElements }}
(locator)
| 1724 | * {{> grabNumberOfVisibleElements }} |
| 1725 | */ |
| 1726 | async grabNumberOfVisibleElements(locator) { |
| 1727 | let els = await this._locate(locator) |
| 1728 | els = (await Promise.all(els.map(el => el.boundingBox() && el))).filter(v => v) |
| 1729 | // Puppeteer visibility was ignored? | Remove when Puppeteer is fixed |
| 1730 | els = await Promise.all(els.map(async el => (await el.evaluate(node => window.getComputedStyle(node).visibility !== 'hidden' && window.getComputedStyle(node).display !== 'none')) && el)) |
| 1731 | |
| 1732 | return els.filter(v => v).length |
| 1733 | } |
| 1734 | |
| 1735 | /** |
| 1736 | * {{> seeInCurrentUrl }} |
no test coverage detected