Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture browser network requests in javascript

I want to capture the response of API calls the browser makes when loading data and validate that data for my automated tests. I am using webdriverio for my automation. Is there any way I can do this ?

network traffic response

like image 496
Kandarp Gandhi Avatar asked Aug 29 '26 20:08

Kandarp Gandhi


1 Answers

  $.ajaxSetup({
        complete: function(xhr, textStatus) {
            console.log(textStatus)
        },
    });
like image 109
Murad Sofiyev Avatar answered Aug 31 '26 08:08

Murad Sofiyev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!