-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed as not planned
Closed as not planned
Copy link
Description
Version
1.56.0
Steps to reproduce
I need to click in the center of the element. I used the following code
await this.selectItem(item).click({ trial: true });
const box = await this.selectItem(item).boundingBox();
this.logger.info(`Bounding box after 1st click: ${JSON.stringify(box)}`);
await this.selectItem(item).click({
position: {
// x: 0,
x: box!.width / 2,
y: box!.height / 2,
},
});
The cursor is positioned in the center only before the action. But for the action it appears on the upper border of the element.
Expected behavior
The click is executed in the center of the element
Actual behavior
Before the action the cursor is positioned in the middle of the element
On the action the position is the default (horizontal: middle, vertical: up)
Additional context
No response
Environment
System
OS: Ubuntu 24.04.2 LTS
CPU: (16) arm65
Binaries:
Node: 22.14.0
pnpm: 9.15.4
npmPackages:
@playwright/test: 1.56.0 (I tried as well version 1.57.0)Metadata
Metadata
Assignees
Labels
No labels