Element is not found in Firefox even though it is definitely there
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, node.js
- Bereich
- testing-qa
Rechercherichtung
Beginne damit, den bereitgestellten page-object-Login-Ablauf mit CodeceptJS 3.7.5, Webdriver 9.19.2 und Firefox nachzustellen, und vergleiche die Navigation durch Klicken auf das Kontosymbol mit I.amOnPage(). Prüfe die gemeldete Suche nach loginFormSelector (#LoginForm) mit Chrome und den aufgeführten Firefox-Versionen. Als erledigt gilt, wenn der Firefox-spezifische Fehler identifiziert und eine zuverlässige Behebung oder ein Workaround bestätigt wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- JavaScript
- Sterne
- 4.2k
- Forks
- 756
- Ø Merge
- 2 T. 10 Std.
- Gemergte PRs (30 T.)
- 18
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codeceptjs/CodeceptJS
-
stale
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
codeceptjs/CodeceptJS#5420 · 1 Kommentar ·
-
stale
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
codeceptjs/CodeceptJS#5358 · 1 Kommentar ·
-
stale
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
codeceptjs/CodeceptJS#4958 · 10 Kommentare · 2 Reaktionen ·
-
stale
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
codeceptjs/CodeceptJS#4778 · 3 Kommentare ·
-
stale
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
codeceptjs/CodeceptJS#5618 · 1 Kommentar ·
Alle Issues in codeceptjs/CodeceptJS
Ähnliche Issues
-
Update HugeIcons library Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
antfu-collective/icones#398 ·
-
ECmail.com Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
wesbos/burner-email-providers#554 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
components-web-app/docs#92 ·