Skip to content

[Question] Is it possible to make an HttpRequest through Playwright? #5999

@symon-skelly

Description

@symon-skelly

I currently use Cypress for my automation testing framework, however I am toying with the idea of moving over to Playwright. One feature of cypress that really shines in the ability to make HttpRequests using the cy.request() function, I use this many times throughout the current system however the most important request is used to setup my randomly generated user application state before I even visit the web-app itself (it makes the request to our webServer which responds with data that is then used for the user-specific localStorage items), this allows me to skip the login screen of my application entirely, saving a lot of time for each test.

I have read the docs about how Playwright can re-use application state but this is not really a viable solution for me because after each test I specifically use new application state.

TLDR: Is it possible to make an HttpRequest through Playwright and get its response?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions