I want to use TestCafe to open a PDF file from my local directory and then take a screenshot of the PDF File.
But it keeps on giving me the Error
ERROR The Chrome 68.0.3440 / Windows 10.0.0 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.
My Code is very simple. Just opening the PDF and then Taking the Screenshot.
test('pdfscreenshot', async t => {
await t
.navigateTo(`file:///TestCafe/screenshots/picture.pdf`)
.takeScreenshot('picture.png')
});
I'm not sure what I'm doing wrong. I am able to take screenshots if its not a PDF tho. Ie. If I change it to
.navigateTo(`https://www.google.com`)
It works