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