Element is not found in Firefox even though it is definitely there
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
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện luồng đăng nhập page-object được cung cấp với CodeceptJS 3.7.5, Webdriver 9.19.2 và Firefox, đồng thời so sánh việc điều hướng bằng cách nhấp vào biểu tượng tài khoản với I.amOnPage(). Kiểm tra việc tìm loginFormSelector (#LoginForm) được báo cáo trên Chrome và các phiên bản Firefox được liệt kê. Hoàn thành khi xác định được lỗi riêng của Firefox và xác nhận được một cách sửa lỗi hoặc workaround đáng tin cậy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I've been facing the following problem for about a week without any updates to CodeceptJS (or other dependencies) or the application code.
- test clicks on the account icon in the page header
- login form opens
- CodeceptJS should verify that a certain element exists
- it doesn't find it within 10 seconds even though it's definitely there; in open mode I can see it and inspect the DOM and it's there
- this happens 95% of time, very rarely it works
- it worked fine until about a week ago
This is the login method in the page object. The selector it doesn't find is the loginFormSelector.
login(email, password) {
this.openLoginForm()
this.fillLoginForm(email, password)
}
openLoginForm() {
I.waitForClickable(this.navigationLinks.responsiveLogin, 10)
I.click(this.navigationLinks.responsiveLogin)
I.waitForElement(this.loginFormSelector, 10) // selector is '#LoginForm'
}
fillLoginForm(email, password) {
I.fillField(this.customerData.loginCustomerEmail, email)
I.click(this.buttons.loginSubmit)
}
The HTML looks like this:
<div id="AccountLogin">
<section>
<section>...</section>
<section id="LoginForm">
<header>...</header>
<form>...</form>
</section>
</section>
</div>
What found out so far:
- no iframe
- no shadow DOM
- if I print the DOM with grabHTML in headless mode, the element is there
- if I inspect the DOM in headed mode, the element is there
- if I pause the test after it enters the login page, I can use I.seeElement in the terminal and it find the element, yet the test fails upon continuation
Does not help:
- waitForVisible instead of waitForElement
- upping the timeout to 20
- adding a hard 3 second wait
- using an older version of Firefox (I tried 145, 144 and 142)
- running it locally or in the CI pipeline does not make a difference
- using a different selector
Does help:
- going to the login page by navigating to it with I.amOnPage() instead of clicking a link to get there
- using Chrome instead of Firefox
CodeceptJS: 3.7.5
Webdriver: 9.19.2
Browser: Firefox 145 (and 144 and 142)
- 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 ·