Playwright: WebKit: TypeError: $XPath is not a function. (In '$XPath(null, locator)', '$XPath' is "function $XPath(element, selector)
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, playwright
- 領域
- testing
研究方向
使用 XPath 定位器,透過 CodeceptJS、Playwright 1.49.1、WebKit 以及所示的 I.waitForEnabled 和 I.click 呼叫重現該問題。首先追蹤 I.waitForEnabled 對 XPath 的處理及其對 page.waitForFunction 的呼叫;當定位器不再引發 $XPath TypeError 且可以點擊已啟用的按鈕時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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 小時
- 30 天內合併 PR
- 16
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
-
stale
難度 4/5 3-5 天 新手友好度 38/100
codeceptjs/CodeceptJS#5618 · 1 則留言 ·
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
Bug
難度 2/5 1-3 小時 新手友好度 70/100
Automattic/safe-publish#594 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
難度 2/5 1-3 小時 新手友好度 70/100
NousResearch/hermes-agent#121143 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
難度 2/5 1-3 小時 新手友好度 75/100