1

"codeceptjs": "^3.0.2" "@wdio/selenium-standalone-service": "^6.8.0" "webdriverio": "^6.8.0"

Sample code:

I.amOnPage("https://www.pdfpdf.com/samples.html");
I.click('//a[@href="samples/Sample2.PDF"]');
I.switchToNextTab();
I.closeCurrentTab();

When above code is run in normal mode (non-headless) with or without stepByStepReport enabled, it works fine.

When above code is run with headless mode and stepByStepReport enabled - it hangs at I.switchToNextTab() Looks like it is not able to take screenshot here

I switch to next tab » Screenshot has been saved to <>\0002.png But 0002.png is not found. We have files only till 0001.png

When the code is run with headless mode and stepByStepReport is disabled, then it works fine.

So problem seems to be with: Headless + stepByStepReport enabled + Link opens a PDF file

Any thoughts or suggestions on this?

1 Answers1

0

It looks like still not supported in headless mode: https://github.com/puppeteer/puppeteer/issues/1872

Oksana
  • 51
  • 4