Take Screenshot doesn't process arguments correctly when run on failure
See original GitHub issueBug description Take Screenshot doesn’t process arguments correctly when it’s registered to be run on failure. Normally when called explicitly it’s working fine. Because of that as example unable to take fullPage screenshot.
Steps To Reproduce Look at my 2 code snippets below:
Take Screenshot not working correctly when registered to run on failure
[Setup] New Page https://www.yahoo.com/
Browser.Register Keyword To Run On Failure Take Screenshot fullPage=True
Click //button[@name="agree"]
Wait Until Network Is Idle
Wait For Elements State ddd state=visible
[Teardown] Close Page
Take Screenshot working correctly when explicitly called
[Setup] New Page https://www.yahoo.com/
Click //button[@name="agree"]
Wait Until Network Is Idle
Take Screenshot fullPage=True
[Teardown] Close Page
Expected behavior Take Screenshot should take full page screenshot for both examples.
Screenshots
Incorrect - screenshot taken from viewport as default. Notice that filename was taken from the argument fullPage=True
Correct - full page screenshot. File name correct according to default filename argument
Desktop:
- OS: Windows 10 / docker image rfbrowser-stable:v8.0.1
- Browser Chrome
- Version 94.0.4606.61
Additional context Checked other KWs to be registered on failure with arguments like Log and they’re working correctly.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Taking screenshots on failure using Robot framework
I want to know how to capture screenshots on failure. Doesnt robot framework automatically take screenshots if script fails? An example will be ......
Read more >[Fixed] Snipping Tool Not Working on Windows 10/11
Snipping Tool is useful and easy in producing screenshots, but sometimes it also fails to work properly. Looking for fixes?
Read more >Fixed - Snipping Tool Not Working on Windows 10/8/7
If Snipping Tool is not working on your Windows 10, 8, 7 computer, you can try to fix it with 4 solutions listed...
Read more >Capture screenshots for only failed tests in TestNG - YouTube
In this video, I have explained about "How to capture screenshots for only failed tests in TestNG".Points covered in this video:1.
Read more >screenshot - Cypress Documentation
Take a screenshot of the application under test and, optionally, the Cypress Command Log. Syntax Usage Correct Usage Arguments fileName (String) A name....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As a workaround doing something like this should work https://github.com/MarketSquare/robotframework-browser/blob/main/atest/test/01_Browser_Management/run_on_failure.robot#L47
But there definitely is a bug.
Lets move the discussion in #1396