Files
2025-06-11 20:03:31 +02:00

15 lines
412 B
TypeScript

import type { Locator } from '@playwright/test';
import { expect } from 'playwright/lib';
export async function stableHover(element: Locator) {
await expect(element).toBeVisible();
await expect(element).toBeAttached();
const page = element.page();
const box = await element.boundingBox();
await page.mouse.move(box!.x + box!.width / 2, box!.y + box!.height / 2);
await page.waitForTimeout(50);
}