I'm writing small bot using Selenium WebDriver. Is it possible to capture data from response of XmlHttpRequests using browsermob-proxy or any different way? I need to inspect received data from POST/GET queries. Actually question more related to functionality of browsermob-proxy and I couldn't find an answer.
I believe the answer is no, but you could have Selenium execute javascript to send the post/get and retrieve the response headers... I use something like this to display errors (jqXHR is jQuery's response XML object: http://api.jquery.com/jQuery.ajax/#jqXHR)
$.post(destURL, formresult, function (data) {
//... process return data
}).fail(function (jqXHR, textStatus, error) {
DisplayError(jqXHR, textStatus, error);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With