CucumberのAPIリファレンス

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

Axe DevTools for Web JavaのAxeWorldクラスに関するAPIリファレンス

Not for use with personal data

このドキュメントは、cucumberパッケージが提供するタイプのリファレンスです。SeleniumやHamcrestパッケージとは異なり、Cucumberパッケージにはスコーピングおよびルール設定用のビルダーまたはマッチャークラスはありません。これらのオプションは、代わりにGherkinステップテキストで直接表現されます。Cucumberテストを書くで説明されているように、AxeWorldクラスは、Gherkinステップで表現できない状態や設定、例えば確認するページ、分析設定、カスタム報告オプション、axe-coreのタイムアウトなどを保持します。

com.deque.html.axedevtools.cucumber.AxeWorld

アクセシビリティをチェックする際にCucumberアクセシビリティステップが使用するページと設定を保持します。

public StepDefinitions(AxeWorld axeWorld) {
    this.axeWorld = axeWorld;
}

@Before
public void setup() throws IOException {
    webDriver = new ChromeDriver();
    axeWorld.setPage(new AxeDriver(webDriver));
}

AxeWorld()

新しいAxeWorldを作成します。

AxeDriver getPage()

世界に設定されたページを取得します。

世界に設定されたページを返します。

void setPage(final AxeDriver page)

アクセシビリティチェックを行うページを定義します。

page: アクセシビリティチェックを行うページ。

void enableAnalytics(final boolean state)

分析データを送信するかどうかを設定します。

state: 分析データを送信するかどうか。

void setAnalyticsUrl(final String url)

分析データを送信するURLを設定します。

url: 分析データを送信するURL。

void setAnalyticsDistinctId(final String did)

分析データを送信する際に使用する個別のIDを設定します。

did: データ送信時に使用する個別のID。

void setAnalyticsComponentName(final String name)

分析用のプロジェクト名を設定します。

name: 分析用のプロジェクト名。

void setReportingOptions(final AxeReportingOptions reportingOptions)

レポート作成時に使用するオプションを設定します。

reportingOptions: レポート作成時に使用するオプション。

void setTimeout(final int timeout)

axe-coreの実行に対するタイムアウトを設定します。

timeout: axe-coreがページを分析するタイムアウト時間。