fix: use fresh button on clicking
This commit is contained in:
@@ -1169,7 +1169,7 @@ export default class Interpreter extends EventEmitter {
|
|||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
throw e;
|
throw e;
|
||||||
}),
|
}),
|
||||||
button.click()
|
page.locator(workingSelector).first().click()
|
||||||
]);
|
]);
|
||||||
debugLog("Navigation successful after regular click");
|
debugLog("Navigation successful after regular click");
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
@@ -1184,17 +1184,17 @@ export default class Interpreter extends EventEmitter {
|
|||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
throw e;
|
throw e;
|
||||||
}),
|
}),
|
||||||
button.dispatchEvent('click')
|
page.locator(workingSelector).first().dispatchEvent('click')
|
||||||
]);
|
]);
|
||||||
debugLog("Navigation successful after dispatch event");
|
debugLog("Navigation successful after dispatch event");
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
paginationSuccess = true;
|
paginationSuccess = true;
|
||||||
} catch (dispatchNavError) {
|
} catch (dispatchNavError) {
|
||||||
try {
|
try {
|
||||||
await button.click();
|
await page.locator(workingSelector).first().click();
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
} catch (clickError) {
|
} catch (clickError) {
|
||||||
await button.dispatchEvent('click');
|
await page.locator(workingSelector).first().dispatchEvent('click');
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user