ページ上で指定されたテキストを含む要素を検索します。
要素は、別の要素を開始点として使用して検索できます。
デフォルトでは、提供されたテキストは部分文字列として扱われるため、'foo''foobar' にも一致します。
完全一致が必要な場合は、2番目のパラメータとして { exact: true } を指定します。

使い方

                    browser.element.findAllByText(text, [options])
                

export default {
  demoTest(browser: NightwatchAPI): void {
    // Search by the substring matching.
    const inputs = browser.element.findAllByText('group of people');

    // Search for the exact occurrence.
    const images = browser.element.findAllByText(
      'The nostalgic office',
      { exact: true }
    );
  }
}

パラメータ

名前 タイプ 説明
text string
options
任意
[object Object]

戻り値

タイプ 説明
Array.<ScopeWebElement>