mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
15 lines
412 B
TypeScript
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);
|
|
}
|