In Gauge [python] custom_screenshot_writer not working when driver is none #2428
KrishnaAstra
started this conversation in
General
Replies: 2 comments 1 reply
-
Additional information Gauge version: 1.4.3 Pluginshtml-report (4.2.0) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Have you tried modifying your code to return a blank screenshot when there's a exception?
Please note this code was suggested by copilot so might want to test this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use Gauge and have created the following Custom screenshot method to get full screen screenshots, It works fine.. However when the script fails before driver instantiation I had returned None but it fails...
Custom method:
@custom_screenshot_writer
def take_screenshot():
"""Custom Utility for Screenshot capture as per the called drivers
Error Message: Exception calling application: expected str, bytes or os.PathLike object, not NoneType
I have some precondition and db verification steps which does not need driver to be present and where I dont have to have screesnhots as well. So what should I return so that Gauge does not throw me error
Beta Was this translation helpful? Give feedback.
All reactions