"Blank" screenshots when using Firefox

I’m having an issue when taking screencaptures in firefox, the same code works ok on chrome (the image is captured correctly)

The debug log shows no errors either:

08-21-2018 02:11:11 PM - [START] - Start action : takeScreenshot

08-21-2018 02:11:11 PM - [PASSED] - Taking screenshot successfully

08-21-2018 02:11:11 PM - [END] - End action : takeScreenshot

The code I’m running is:
WebUI.takeScreenshot(‘D:\\Katalon Project\\Google\\screenshot_t1.jpg’ )

As I said works ok in chrome,there I get the correct image but not in firefox, the image file is created but it just contains a “white square”.

Any ideas?

Thanks

Hi Thomas

I’ve never seen this problem with Firefox. Try creating a simple project with one Test Case that takes a screenshot. If you target his page and post your code, we can all try it.

Hi,
I just tried to create a new simple project as you suggested, and then everything works as expected.
The only difference was that I added a delay before taking the screenshot.

I changed my existing script (added a delay: WebUI.delay(1) ) and now it seems to work…

Thanks for your help.

Just a quick update: I removed the delay, and the screenshot still works in the test script, so I’m unable to reproduce this behaviour without running my orginal script which seems to work now (with the delay)

Very strange. Remember test browsers and web drivers can be weird. The former has no interest in helping you, the latter is a faithful but dumb robot that does everything you say (even when what you say is dumber still, as it frequently reminds me).

B)