Skip to content

Unable to make API request calls against localhost : @ Error: apiRequestContext.post: connect ECONNREFUSED ::1 #3

@kiarrasayshi

Description

@kiarrasayshi

Following all setup instructions and steps in the tutorial leads me to an issue with making the post request against the local API. The rest of the test runs fine using local host and I am able to make this request from Postman. This is my first attempt at testing API calls using Playwright against a local environment. I am able to make API request calls using playwright against live APIs in test and production environments. I don't think this is an issue with your tutorial per se as I've seen other people having this issue and requesting help online without finding good fixes, but if this is a common issue, it may be helpful to mention a fix (if you know of one!) in the tutorial steps.

Note I get this error whether I run the tests in the terminal or through the playwright ui, but, again, not when using Postman to make the request.

As I'm still able to make the API request in postman, I've just commented out this line of code so I can continue with the tutorial, which I am finding incredibly helpful! Just wanted to document this issue in case anyone else runs into it while working through the tutorial.
playwright tutorial error

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions