Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Element is not found in Firefox even though it is definitely there

Offen
#5,336 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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

stale

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

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codeceptjs/CodeceptJS

Alle Issues in codeceptjs/CodeceptJS

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.