codeceptjs / codeceptjs/CodeceptJS

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

オープン
#4,749 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
stale
主要言語
JavaScript
スター
4.2k
フォーク
757
平均マージ
2日 9時間
マージ済み PR(30日)
16

説明

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:

```javascript
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!

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

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

評価

この issue はまだ評価されていません。

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

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