Playwright: WebKit: TypeError: $XPath is not a function. (In '$XPath(null, locator)', '$XPath' is "function $XPath(element, selector)

オープン
#4,749 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, playwright
領域
testing

調査の方向性

XPath locatorを使用して、CodeceptJS、Playwright 1.49.1、WebKit、および示されているI.waitForEnabledとI.clickの呼び出しで問題を再現します。まず、I.waitForEnabledのXPath処理と、そのpage.waitForFunction呼び出しを追跡します。完了条件は、locatorが$XPath TypeErrorを発生させなくなり、有効なボタンをクリックできることです。

索引モデルが issue の本文から書いたものです。

説明

stale

Hello everyone,

I'm currently using codecept js Playwright(1.49.1) for testing and have the following code to click a button with a specific text:

I.waitForEnabled(locate('.RadioButton-caption').withText(`${option}`));
I.click(locate('.RadioButton-caption').withText(`${option}`));

I am running the test in WebKit, but I’m encountering the following error:

     element ({xpath: .//*[contains(concat(' ', normalize-space(./@class), ' '), ' RadioButton-caption ')][contains(., 'olyattest')]}) still not enabled after 10 sec
page.waitForFunction: TypeError: $XPath is not a function. (In '$XPath(null, locator)', '$XPath' is "function $XPath(element, selector) {
  const found = document.evaluate(selector, element || document.body, null, 5, null);
  const res = [];
  let current = null;
  while (current = found.iterateNext()) {
    res.push(current);
  }
  return res;
}")

It looks like I.waitForEnabled does not support xpath when running in webkit using playwright. Could you please fix it?

Thank you!

主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。