Rayrun
← Back to Discord Forum

How to catch a fetch request when entering the site?

dmitrybatkovichposted in #help-playwright
Open in Discord
dmitrybatkovich
dmitrybatkovich

I found an example in the documentation for catching GET and POST requests, but I would like to find out how to use this library to catch a fetch request whose Request Url contains the Url I need and output its contents to the Python console?

This thread is trying to answer question "How to use a library to catch a fetch request whose Request Url contains the Url I need and output its contents to the Python console?"

1 reply
plays__with__squirrels
plays__with__squirrels

Using expect_request you can return the api response for a specific endpoint. Here is that documentation for doing that. https://playwright.dev/python/docs/network

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].