DEV Community

Discussion on: πŸ”§ Building Playwright Framework Step By Step - Implementing POM as Fixture and Auth User Session

Collapse
 
shailendrakumaromkar profile image
Shailendra Omkar • Edited

Hi @idavidov13

After running command - npx playwright test auth.setup.ts
getting below error
looks like it is pointing to staging env url but I am not sure how to create account in staging env and get the URL, API_URL for staging env ?

Although I have created account in conduit.bondaracademy.com/

Do I need to create empty "userSession.json" file manually
or
It should have user session details stored in it after running above command ?

Error: page.goto: net::ERR_NAME_NOT_RESOLVED at staging.conduit.bondaracademy.com/
Call log:

  • navigating to "staging.conduit.bondaracademy.com/", waiting until "networkidle" at ..\pages\clientSite\homePage.ts:35 33 | */ 34 | async navigateToHomePageGuest(): Promise { > 35 | await this.page.goto(process.env.URL as string, { | ^ 36 | waitUntil: 'networkidle', 37 | });
Collapse
 
idavidov13 profile image
idavidov13

Hi @shailendrakumaromkar
The issue is caused by the wrong URL you’re trying to navigate to. I add to the notes that the data in .env.stage is only for demonstration purposes.