Okay so, in firefox devtools network tab you can double tap a request to open it in a new tab. For the site I'm working with, it's only working if I double tap on it and it isnt working if I just copy the url to open it. Now I would be grateful if anyone would be kind enough to help me with this confusing situation & how to do it on playwright, and would love an explanation too.
Here's an example video: https://cdn.discordapp.com/attachments/1130330545587494933/1171580213373702185/example.mp4?ex=655d3219&is=654abd19&hm=02af4afc49b8e4c143e317c45da9d89bf4b912af122cb3a50771f10ff1f86985&
This thread is trying to answer question "How can I double tap a request to open it in a new tab in Firefox Devtools and replicate this process on Playwright?"
I really don't understand what you are trying to achieve with those steps in a silent video. Can you please explain your objective, how you think you want to achieve that with Playwright, and what is your problem in doing that with Playwright? Right now I have to guess.
Maybe you want to change the response of some API call? Fool the website/frontend into believing that an API call responded some different way? In that case you can use: https://playwright.dev/docs/mock (But if may not be enough to bypass any server-side rules/validations ;-))
Basically, I want to wait until a request includes "buynow?", once that request is made, I want to edit and make the request again. And after that, I want to open the response on a new tab If that makes sense
There's a nice explanation about API testing, hybrid API testing and response interception here: https://www.youtube.com/watch?v=OQKwFDmY64g
There's also a howto here: https://playwright.dev/docs/mock#modify-api-responses
Both video and docs are changing the response. But you can also change the request in a similar way. Just have a look and spend some time to learn.
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 firstname.lastname@example.org.