feat: wait before next iteration for content load completion

This commit is contained in:
karishmas6
2024-08-18 22:35:35 +05:30
parent 48a5ac3b82
commit 5d1747c874

View File

@@ -421,6 +421,9 @@ export default class Interpreter extends EventEmitter {
return allResults;
}
// Wait a bit before next iteration to ensure content is loaded
await page.waitForTimeout(1000);
// Check if new items were loaded
const newItemsLoaded = await page.evaluate((prevCount, listSelector) => {
const currentCount = document.querySelectorAll(listSelector).length;