Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging HTML doesn't get embedded in the log.html #5118

Open
undacmic opened this issue Apr 24, 2024 · 1 comment
Open

Logging HTML doesn't get embedded in the log.html #5118

undacmic opened this issue Apr 24, 2024 · 1 comment

Comments

@undacmic
Copy link

I have a couple of test suites in the form of .robot files. Each test of each of the test suites has a Teardown_w_screenshot as [Teardown] in which I'm taking a screenshot and want to embed it using the Builtin.Log keyword:

Teardown_w_screenshot
    [Documentation]
    ...    Take a screenshot and embed it into the log for debugging purposes
    ${screenshot_path}=    Take Screenshot    return_as=path_string
    ${relative_path}=    Set Variable    ${screenshot_path.replace('/tmp/RobotFramework/', '')}
    Log    <img src="${relative_path}">    html=yes
    Close Browser

The results are stored in a RobotFramework directory which has a top-level log.html, report.html and output.xml and a directory for each of the test suited (for example: test-onboarding). In these test suite directories i have individual log.html, report.html and output.xml files and also /browse/screenshot/ directory which contains all the images created.

The image exists, the relative path is correct (if i manually edit the HTML and put the resulting tag it works), but no is inserted in the log. What may cause the issue?

@pekkaklarck
Copy link
Member

Are you sure the path is correct? What do you get if you log it as-is and not as HTML?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants