3

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

1
  • You want to detect ajax responses all request? Commented Mar 22, 2018 at 19:08

1 Answer 1

1
  $.ajaxSetup({
        complete: function(xhr, textStatus) {
            console.log(textStatus)
        },
    });
Sign up to request clarification or add additional context in comments.

2 Comments

This is configuration for all ajax request not spesific ajax You can read about in therere api.jquery.com/jquery.ajaxsetup
Also you can $(document).ajaxComplete(function() { // Your code here });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.