Skip to content

in version 4.1.1 screenshots are not displayed #115

Description

@mmajcherczyk

test.info(driver().getCurrentUrl(), MediaEntityBuilder.createScreenCaptureFromPath(filename).build());
in html it looks like this
<img class="r-img" onerror="this.style.display=&quot;none&quot;" data-featherlight="file:///2020-01-09_21.41.18.623_testScreenshot.png" src="file:///2020-01-09_21.41.18.623_testScreenshot.png" style="display: none;">

in version 4.0.9 html it looked like this
<img class="r-img" onerror="this.style.display=&quot;none&quot;" data-featherlight="2020-01-09_21.45.58.641_testScreenshot.png" src="2020-01-09_21.45.58.641_testScreenshot.png" data-src="2020-01-09_21.45.58.641_testScreenshot.png">
and it worked correctly

now I must provide the absolute path
test.info(driver().getCurrentUrl(), MediaEntityBuilder.createScreenCaptureFromPath(new File(filePath + fileName).getAbsolutePath()).build());

<img class="r-img" onerror="this.style.display=&quot;none&quot;" data-featherlight="file:///C:/Users/Siup/Documents/GitHub/selenium_java/1578603091131/2020-01-09_21.52.36.311_testScreenshot.png" src="file:///C:/Users/Siup/Documents/GitHub/selenium_java/1578603091131/2020-01-09_21.52.36.311_testScreenshot.png">
but I can't send such a report to anyone because it will stop working if the path changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions