Show / Hide Table of Contents

Class PageReportBuilder

Classes for generating HTML report from given Axe-Core results

Inheritance
object
PageReportBuilder
Namespace: AxaFrance.AxeExtended.HtmlReport
Assembly: AxaFrance.AxeExtended.HtmlReport.dll
Syntax
public class PageReportBuilder

Constructors

| Edit this page View Source

PageReportBuilder()

Initializes a new instance of the PageReportBuilder class using default options.

Declaration
public PageReportBuilder()
| Edit this page View Source

PageReportBuilder(PageReportOptions)

Initializes a new instance of the PageReportBuilder class using the specified options.

Declaration
public PageReportBuilder(PageReportOptions options)
Parameters
Type Name Description
PageReportOptions options

Properties

| Edit this page View Source

Analyze

Delegate to analyze the given context. this function should be implemented according to test framework. such as using Selenium.

Declaration
public PageReportBuilder.AnalyzeDelegate Analyze { get; }
Property Value
Type Description
PageReportBuilder.AnalyzeDelegate
| Edit this page View Source

CanGetScreenshot

Indicate whether Screenshot is available in the currenct context. Internally, it means GetScreenshot delegate is provided.

Declaration
public bool CanGetScreenshot { get; }
Property Value
Type Description
bool
| Edit this page View Source

Config

Provide a custom axe configure (https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure). If provided, the configuration will be used. If not provided, the default axe configuration will be used.

Declaration
public JObject Config { get; set; }
Property Value
Type Description
JObject
| Edit this page View Source

GetScreenshot

Delegate to get screenshot of the given node. this function should be implemented according to test framework. such as Selenium.

Declaration
public PageReportBuilder.GetScreenshotDelegate GetScreenshot { get; }
Property Value
Type Description
PageReportBuilder.GetScreenshotDelegate
| Edit this page View Source

Options

Options for the page report.

Declaration
public PageReportOptions Options { get; set; }
Property Value
Type Description
PageReportOptions
| Edit this page View Source

Result

Test result of the page.

Declaration
public AxePageResult Result { get; }
Property Value
Type Description
AxePageResult

Methods

| Edit this page View Source

Build()

Analyze and Build the test report of the given context.

Declaration
public PageReportBuilder Build()
Returns
Type Description
PageReportBuilder
| Edit this page View Source

Build(AxeResult)

Converts the given Axe-Core results to HTML report using actual configuration.

Declaration
public PageReportBuilder Build(AxeResult result)
Parameters
Type Name Description
AxeResult result

The AxeResult to be converted.

Returns
Type Description
PageReportBuilder
| Edit this page View Source

Export(string)

Export Enhanced AxeResult (with Screenshots) to expected format.

Declaration
public string Export(string fileName = null)
Parameters
Type Name Description
string fileName

The filename of the exported report. Default value is "index.html"

Returns
Type Description
string

absolute path of the exported test report.

| Edit this page View Source

WithConfig(JObject)

Initilaize axe-core engine with custom configuration.

Declaration
public PageReportBuilder WithConfig(JObject config)
Parameters
Type Name Description
JObject config

axe costom configuration object

Returns
Type Description
PageReportBuilder
| Edit this page View Source

WithConfig(string)

Initilaize axe-core engine with customed configuration

Declaration
public PageReportBuilder WithConfig(string configFile)
Parameters
Type Name Description
string configFile

axe core configuration file (in json format)

Returns
Type Description
PageReportBuilder
| Edit this page View Source

WithOptions(PageReportOptions)

Provide a custom test options

Declaration
public PageReportBuilder WithOptions(PageReportOptions options)
Parameters
Type Name Description
PageReportOptions options

Options

Returns
Type Description
PageReportBuilder

ReportBuilder with updated options

| Edit this page View Source

WithRgaaExtension()

Initilaize axe-core engine with customed RGAA rules.

Declaration
public PageReportBuilder WithRgaaExtension()
Returns
Type Description
PageReportBuilder
Remarks

This method is not compatible with other WithConfig(JObject) method.

  • Edit this page
  • View Source
In this article
Back to top Copyright ® 2016-2025 AXA France, All rights reserved.