fix screen capture in share test to check for exceptions after rather than before