codeceptjs script get stuck when using session inside a Scenario
@DenysKuchma đang làm issue này rồi.
Từ ngày 8/1/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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!
- Ngôn ngữ chính
- JavaScript
- Star
- 4.2k
- Fork
- 756
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 16
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codeceptjs/CodeceptJS
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codeceptjs/CodeceptJS#5420 · 1 bình luận ·
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
codeceptjs/CodeceptJS#5358 · 1 bình luận ·
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
codeceptjs/CodeceptJS#4958 · 10 bình luận · 2 reaction ·
-
stale
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
codeceptjs/CodeceptJS#4778 · 3 bình luận ·
-
stale
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
codeceptjs/CodeceptJS#5618 · 1 bình luận ·
Tất cả issue của codeceptjs/CodeceptJS
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Browser Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-javascript#24577 · 1 bình luận ·
-
curation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
amponce/archive-movie-browser#186 ·
-
light
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
aemdemos/patients-stryker#253 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
clerk/javascript#9852 ·