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 ?
1 Answer
$.ajaxSetup({
complete: function(xhr, textStatus) {
console.log(textStatus)
},
});
2 Comments
Murad Sofiyev
This is configuration for all ajax request not spesific ajax You can read about in therere api.jquery.com/jquery.ajaxsetup
Murad Sofiyev
Also you can $(document).ajaxComplete(function() { // Your code here });
