Compare commits

...

1 Commits

Author SHA1 Message Date
8e56b5997f wiggle move robustness 2024-07-17 20:13:18 +10:00

View File

@ -122,7 +122,7 @@ export const wiggleMove = async (
const step = dist / steps const step = dist / steps
for (let i = 0, j = 0; i < dist; i += step, j += 1) { for (let i = 0, j = 0; i < dist; i += step, j += 1) {
if (locator) { if (locator) {
const isElVis = await page.locator(locator).isVisible() const isElVis = await page.locator(locator).isVisible({ timeout: 100 })
if (isElVis) return if (isElVis) return
} }
const [x1, y1] = [0, Math.sin((tau / steps) * j * freq) * amplitude] const [x1, y1] = [0, Math.sin((tau / steps) * j * freq) * amplitude]