swithTo/within not swith to iframe
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, nodejs
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện flow Puppeteer được cung cấp trong CodeceptJS 3.6, tập trung vào switchTo, within và waitForElement với các selector iframe được cung cấp. So sánh hành vi với CodeceptJS 3.4.1 và thêm coverage hồi quy khi đã cô lập được lỗi; được xem là hoàn tất khi các selector đầu vào của iframe được resolve và sequence được cung cấp hoàn tất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What are you trying to achieve?
After update codeceptjs, I can't get input in iframe. I just try using switchTo and within. My code work on codecept 3.4.1
What do you get instead?
Provide console output if related. Use
--verbosemode for more details.
I wait for visible "[data-marker=new-card]", 5
I click "[data-marker=new-card]"
I wait for element "[data-marker=iframe]", 5
I switch to "[data-marker=iframe]"
I wait for element "[id=pan]", 5
› [Browser:Warning]
[1] Error (Non-Terminated) | Error: element ([id=pan]) still not present on page after 5 sec
Waiting for selector `[id=pan]` failed: Waiting failed: 5000ms exceeded | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: element ([id=pan]) still not present on page after 5 sec
Waiting for selector `[id=pan]` failed: Waiting failed: 5000ms exceeded undefined...
[1] <teardown> Stopping recording promises
...
Error: element ([id=pan]) still not present on page after 5 sec
Waiting for selector `[id=pan]` failed: Waiting failed: 5000ms exceeded
Provide test source code if related
await I.waitForElement(this.iframe, FRONT_TIMEOUT_SEC);
await I.switchTo(this.iframe);
await I.waitForElement(this.cardNumberInput, FRONT_TIMEOUT_SEC);
await I.waitForVisible(this.cardNumberInput, FRONT_TIMEOUT_SEC);
await I.fillField(this.cardNumberInput, creditCard.cardNumber);
await I.fillField(this.expDateInput, creditCard.expDate);
await I.fillField(this.cvcInput, creditCard.cvv);
await I.switchTo();
Details
- CodeceptJS version: 3.6
- NodeJS Version: 18.16.1
- Operating System: mac os
- puppeteer || webdriverio || testcafe version (if related)
- Configuration file:
exports.config = {
fullPromiseBased: true,
tests: testsPath,
output: `${pwd}/output`,
bootstrap: () => {
global.codecept_dir = pwd;
},
name: 'xxx',
helpers: {
Puppeteer: {
show: true,
waitForNavigation: 'networkidle2',
waitForTimeout: 30000,
getPageTimeout: 30000,
windowSize: '1000x1000',
browser: 'chrome',
chrome: {
args: ['--no-sandbox',
'--window-size=1920,1000',
'--disable-setuid-sandbox',
'--disable-web-security',
// workaround for iframe in {headless: false} mode,
// see details https://github.com/puppeteer/puppeteer/issues/4964
'--disable-features=site-per-process',
],
devtools: false,
},
manualStart: false,
restart: false,
keepCookies: true,
keepBrowserState: false,
},
FileSystem: {},
},
plugins: {
screenshotOnFail: {
enabled: false,
},
retryTo: {
enabled: true
},
tryTo: {
enabled: true,
require: ''
}
},
require: ['ts-node/register'],
};
- 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 ·