Element is not found in Firefox even though it is definitely there
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- testing-qa
Direzione di ricerca
Inizia riproducendo il flusso di login page-object fornito con CodeceptJS 3.7.5, Webdriver 9.19.2 e Firefox, confrontando la navigazione facendo clic sull’icona dell’account con I.amOnPage(). Verifica la ricerca segnalata di loginFormSelector (#LoginForm) con Chrome e con le versioni di Firefox elencate. Il lavoro è completato quando viene identificato il problema specifico di Firefox e viene confermata una correzione affidabile o un workaround.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- JavaScript
- Stelle
- 4.2k
- Fork
- 756
- Merge medio
- 2g 9h
- PR unite (30g)
- 16
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codeceptjs/CodeceptJS
-
stale
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
codeceptjs/CodeceptJS#5420 · 1 commento ·
-
stale
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
codeceptjs/CodeceptJS#5358 · 1 commento ·
-
stale
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
codeceptjs/CodeceptJS#4958 · 10 commenti · 2 reazioni ·
-
stale
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
codeceptjs/CodeceptJS#4778 · 3 commenti ·
-
stale
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
codeceptjs/CodeceptJS#5618 · 1 commento ·
Tutte le issue di codeceptjs/CodeceptJS
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Add: BuyPass TV Apertachannels:add check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
S: triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·