Closed tomekPawlak closed 11 months ago
@allcontributors please add @tomekTieto for bugs.
@aaltat
@tomekTieto already contributed before to bug
That should work, but looks like it doesn't.
I'm seeing what I believe is the same error on a Bitbucket Pipelines container.
There seems to be an error in the code snipped above. Adding Browser also in front of Take Screenshot it works, which means in the above code some other Take Screenshot keyword was used:
Browser.Register Keyword To Run On Failure Browser.Take Screenshot filename=
However, I have another problem, not sure if this should be another issue. When using the full path instead of file name, it does not work:
Browser.Register Keyword To Run On Failure Browser.Take Screenshot filename=${OUTPUT DIR}/screenshots/failed/robotframework-browser-screenshot-{index}
The output is:
Taking a screenshot with the same arguments, normally not on failure, it works.
This is not fixed, opening
Fuond the reason, code in https://github.com/MarketSquare/robotframework-browser/blob/main/Browser/browser.py#L909 is too naive and makes wrong assumption. Instead code should look argspec more closely and make better decision about argument types.
Like agreed here #1396 reporting this.
Describe the bug Take screenshot filename argument failing when registered to be run on failure:
Trace log:
Working fine for positional argument.
To Reproduce Here look at a code snippet:
Expected behavior Filename argument should be processed correctly and desired filename and path should be set.
Desktop (please complete the following information):
Additional context Please find attached logs