karate icon indicating copy to clipboard operation
karate copied to clipboard

[ui] screenshot() call needs to fail gracefully

Open ptrthomas opened this issue 2 years ago • 4 comments

reported here: https://stackoverflow.com/q/73327132/143475

for now, we'll use a try-catch

ptrthomas avatar Aug 12 '22 13:08 ptrthomas

This happens to me as well on 1.2.0 but not on every run. However, when it happens in my case, then always after using * delay() as an intermediate function call before * screenshot().

CleanHit avatar Sep 09 '22 11:09 CleanHit

@CleanHit can you please try 1.3.0 https://github.com/karatelabs/karate/wiki/1.3.0-Upgrade-Guide

ptrthomas avatar Sep 09 '22 12:09 ptrthomas

@ptrthomas I've tried to use like that and it fails randomly.

And delay(5000)
And screenshot() 

I don't know if I'm just being lucky, but using the above doesn't fail on 1.3.0.RC2. This delay(5000).screenshot() also works in 1.3.0.RC2

CleanHit avatar Sep 09 '22 12:09 CleanHit

@CleanHit I think the change for this issue made it into RC2 so that's good news

ptrthomas avatar Sep 09 '22 13:09 ptrthomas

1.3.0 released

ptrthomas avatar Nov 02 '22 17:11 ptrthomas