Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Incosistent behaviour of grabElementBoundingRect in iframe

Aperta
#2,770 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, node.js, playwright
Ambito
testing-qa

Direzione di ricerca

Inizia riproducendo la chiamata fornita a grabElementBoundingRect all'interno di un iframe con Playwright e WebDriver, confrontando le coordinate restituite. L'issue è risolta quando entrambe le integrazioni riportano in modo coerente le posizioni degli elementi iframe relative al viewport previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What are you trying to achieve?

I have an iframe somewhere on my page, with some elements inside it. I am using grabElementBoundingRect to check if an element in the iframe is within the current viewport of the iframe (ie if i have to scroll down to see the element).

I am running my tests mostly with Playwright, but also with WebDriver on some platforms (hello, IE users!)

What do you get instead?

The values returned by grabElementBoundingRect on elements within iframes differ between these WebDriver and Playwright. Playwright returns an absolute x/y position on the screen, while WebDriver returns an x/y position within the iframe.

const elemRect = await within({frame: "#myIframe"}, () => {
    return this.grabElementBoundingRect("#myElement");
});
Details
  • CodeceptJS version: 3.0.4
  • NodeJS Version: v14.15.4
  • Operating System: Ubuntu 18.04
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeceptjs/CodeceptJS

Tutte le issue di codeceptjs/CodeceptJS

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.