TrevorSundberg / puppeteer-in-electron

Use puppeteer to test and control your electron application.
MIT License
342 stars 51 forks source link

Puppeteer goes in timeout if window is minimed or hide #60

Open matteoventuri7 opened 10 months ago

matteoventuri7 commented 10 months ago

Puppeteer does not find elements in the page if the window is hide or minimized.

I create page with the window like this:

const getNewPage = async () => {
  const scraperWindow = new BrowserWindow({
    width: 1366,
    height: 768,
    frame: false
  });
  scraperWindow.setIgnoreMouseEvents(true);
  scraperWindow.minimize();

  const page = await pie.getPage(browser, scraperWindow);  
  return page;
}

then I play a recording script using puppeteer replay but i receive this error: "TimeoutError: Timed out after waiting 5000ms"

If i don't minimize the window, the replay script run successfully.