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

Create Report<TOwner> class and add Report property to PageObject<TOwner> #224

Closed
YevgeniyShunevych opened this issue Oct 11, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@YevgeniyShunevych
Copy link
Member

  1. Create Report<TOwner> class that wraps ILogManager and duplicates its methods but with returning of TOwner. Is useful for reporting inside tests within a fluent chain.

  2. Add property to PageObject<TOwner>:

    public Report<TOwner> Report { get; }

Usage

Go.To<SomePage>().
    Report.Trace("tracemessage").
    Report.Debug("debugmessage").
    Report.Info("infomessage").
    Report.Warn("warnmessage").
    Report.Error(errorException).
    Report.Error("errormessage", errorException).
    Report.Error("errormessage", exceptionStackTrace).
    Report.Fatal(fatalException).
    Report.Fatal("fatalmessage", fatalException).

    Report.Start("Some section").
    // Do something within section.
    Report.EndSection().

    Report.Screenshot().
    Report.Screenshot("sometitle");
@YevgeniyShunevych YevgeniyShunevych added this to the 1.0.0 milestone Oct 11, 2018
@YevgeniyShunevych YevgeniyShunevych self-assigned this Oct 11, 2018
YevgeniyShunevych added a commit that referenced this issue Oct 11, 2018
…t<TOwner>; Add tests: Report_BulkLog, Report_Section, Report_Screenshot_WithoutScreenshotConsumer and Report_Screenshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant