(dx, dy)
| 123 | }) |
| 124 | |
| 125 | async function changeSizeBy(dx, dy) { |
| 126 | let { width, height } = await driver.manage().window().getRect() |
| 127 | width += dx |
| 128 | height += dy |
| 129 | |
| 130 | let rect = await driver.manage().window().setRect({ width, height }) |
| 131 | if (rect.width === width && rect.height === height) { |
| 132 | return |
| 133 | } |
| 134 | return await driver.wait(forSizeToBe(width, height), 1000) |
| 135 | } |
| 136 | |
| 137 | function forSizeToBe(w, h) { |
| 138 | return async function () { |
no test coverage detected