codeceptjs script get stuck when using session inside a Scenario
維護者通常 1 天內回覆
@DenysKuchma 已經在處理了。
開始於 2026年1月8日。
評估
這個 Issue 還沒有評估資料。
描述
Hi,
I upgraded my testing platform from codeceptjs v 3.6.10 to v3.7.4 but encounter a strange issue with codeceptjs script get stuck and never get timeout. I used explicitly timeout in config and in scenario but non worked. Stuck may happen on I.grabAttributeFrom, grabTextFrom which could be multi sessions or multi Data Scenarios. I tried to narrow down the issue and found that If a Scenario start and you perform some tasks using grabTextFrom or grabAttributeFrom with same exact locate function and then use the same exact locate function inside a Scenario Session then it get stuck. It could be the locate function cache of the first browser session element which may be behaving differently when called again in a different session in same test case?
Here is the general test case template:
Scenario('issue of multi sessions', async () => {
login('abc');
I.amOnPage('mywebsite');
let v = await I.grabTextFrom(locate('#myid'));
await session('second', async () => {
I.amOnPage(',mywebsite');
let url2 =I.grabCurrentUrl();
let v = await I.grabTextFrom(locate('#myid')); // get stuck never timeout
});
}).tag('issue');
similar thing happen when i tried to call the same Scenario with data(array).Scenario and locate function get stuck. I tried few without locate but something again did not let he script to run multiple times when data was passed.
Is the same cache get built for the elements inside codceptjs which never cleared with Scenario run multiple times with data being passed? If i dive such scenario into two then they run fine, any clue?
Also any data being not managed correctly when a session is created inside a Scenario? A reference of element on one session is being shared at a wrong place in a different session, any clue?
My application perform few operations so its hard to write a standalone script with the issue, I hope a review of of such feature by developer may pin point the issue and in the mean while i will try to make a test case which reproduce such issue as stand alone Scenario.
Any help will be highly appreciated.
Thanks!
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 755
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 18
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
codeceptjs/CodeceptJS#5731 ·
維護者通常 1 天內回覆
-
`I.waitForFile` (FileSystem helper) fails if directory does not exist (yet)可能已有人在做 @danielrentz 於 251 天前認領。 未關閉stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
維護者通常 1 天內回覆
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
bug user-priority/P2
難度 1/5 1 小時以內 新手友好度 92/100
維護者通常 1 天內回覆
-
難度 2/5 1 小時以內 新手友好度 78/100
opencart/opencart#15763 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
neondatabase/agent-skills#139 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
Effect-TS/effect#8881 · 1 則留言 ·
維護者通常 1 天內回覆
-
mail processing verified
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 7 天內回覆