How to take/capture screenshot.
There are few ways to capture a screenshot depending on place where you need to do it.
Use Report.Screenshot(...)
method:
Go.To<OrdinaryPage>()
.Report.Screenshot();
//.Report.Screenshot("optional title"); // To specify a title.
//.Report.Screenshot(ScreenshotKind.FullPage); // To specify a kind (FullPage/Viewport).
AtataContext.Current.TakeScreenshot();
AtataContext.Current.Report.Screenshot();
Use TakeScreenshot trigger. Below are just 2 possible scenarios.
[TakeScreenshot(TriggerEvents.BeforeClick)]
// [TakeScreenshot("optional title", TriggerEvents.BeforeClick)] // To specify a title.
// [TakeScreenshot(ScreenshotKind.FullPage, TriggerEvents.BeforeClick)] // To specify a kind.
public Button<_> Save { get; private set; }
[TakeScreenshot(TriggerEvents.Init)]
public class SomePage : Page<_>
{
}