diff --git a/test/integration/test_utils.mjs b/test/integration/test_utils.mjs index 4146fcd7e..2ef42d68e 100644 --- a/test/integration/test_utils.mjs +++ b/test/integration/test_utils.mjs @@ -268,13 +268,8 @@ function getSelector(id) { } async function getRect(page, selector) { - // In Chrome something is wrong when serializing a `DomRect`, - // so we extract the values and return them ourselves. await page.waitForSelector(selector, { visible: true }); - return page.$eval(selector, el => { - const { x, y, width, height } = el.getBoundingClientRect(); - return { x, y, width, height }; - }); + return (await page.$(selector)).boundingBox(); } function getQuerySelector(id) {