* Get bounding box of the element * @returns {Promise } Bounding box with x, y, width, height properties
()
| 199 | * @returns {Promise<Object>} Bounding box with x, y, width, height properties |
| 200 | */ |
| 201 | async getBoundingBox() { |
| 202 | switch (this.helperType) { |
| 203 | case 'playwright': |
| 204 | return this.element.boundingBox() |
| 205 | case 'webdriver': |
| 206 | const rect = await this.element.getRect() |
| 207 | return { |
| 208 | x: rect.x, |
| 209 | y: rect.y, |
| 210 | width: rect.width, |
| 211 | height: rect.height, |
| 212 | } |
| 213 | case 'puppeteer': |
| 214 | return this.element.boundingBox() |
| 215 | default: |
| 216 | throw new Error(`Unsupported helper type: ${this.helperType}`) |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Click the element |
no outgoing calls
no test coverage detected