Cypress 10 - How can I get the configured baseUrl? #22246
Unanswered
andrews1-digital
asked this question in
Questions and Help
Replies: 2 comments
-
Looks like this has been fixed in Cypress 10.1.0 (I was using 10.0.3 when I raised this). |
Beta Was this translation helpful? Give feedback.
0 replies
-
...have same issue with 10.11 in typescript for a validation if it is an internal link url.includes(Cypress.config('baseUrl') |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Cypress 9, I would configure the baseUrl as per legacy-configuration and could retrieve its value by
Cypress.config().baseUrl
.In Cypress 10, I configure the baseUrl in the e2e property of
cypress.config.js
, but nowCypress.config().baseUrl
returnsnull
. Looking at the return ofCypress.config()
, it seems like I'd need to retrieve its value usingCypress.config().rawJson.baseUrl
. Is this the recommend approach? Or is there a simpler command to retrieve the configured baseUrl?Beta Was this translation helpful? Give feedback.
All reactions