Cypress: Getting coordinates of an element

Created on 2 Jul 2019  路  2Comments  路  Source: cypress-io/cypress

Hello

I m really blocked. i can't execute the function getBoundingClientRect()
could you please give me some instructions or another way to get the coordinates.

Thank you in advance.

question

Most helpful comment

cy.get(target)
        .then($target => {
            let coords = $target[0].getBoundingClientRect();
 })

Please use gitter chat for such questions next time :)

All 2 comments

cy.get(target)
        .then($target => {
            let coords = $target[0].getBoundingClientRect();
 })

Please use gitter chat for such questions next time :)

Issues in our GitHub repo are reserved for potential bugs or feature requests. This issue will be closed since it appears to be neither a bug nor a feature request.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zbigniewkalinowski picture zbigniewkalinowski  路  3Comments

szabyg picture szabyg  路  3Comments

brian-mann picture brian-mann  路  3Comments

weskor picture weskor  路  3Comments

rbung picture rbung  路  3Comments