Skip to content

Screen shots full desktop selenium PageSource saving

Jakub Raczek edited this page Mar 8, 2021 · 4 revisions

Our framework allows you to take screenshots: full desktop (not supported in .NET Core), selenium browser, screenshots of elements. It also allows you to save page source.

Screenshots can be taken automatically in case of test failure by setting it in app.config file:

<?xml version="1.0" encoding="utf-8"?>
...
    <!--Screenshots and logging-->
    <add key="FullDesktopScreenShotEnabled" value="true"/>
    <add key="SeleniumScreenShotEnabled" value="true"/>
    <add key="GetPageSourceEnabled" value="true"/>
...
</configuration>

Folder where screenshots will be saved is also set in in app.config file:

<?xml version="1.0" encoding="utf-8"?>
...
    <!--Downloaded files, screenshots and page source location-->
    <add key="UseCurrentDirectory" value="true"/>
    <add key="ScreenShotFolder" value="\TestOutput"/>
    <add key="PageSourceFolder" value="\TestOutput"/>
...
</configuration>
Clone this wiki locally