Below is the code I have been working on:
(function() {
var origOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
this.addEventListener('load', function()
console.log(this.responseText); //retrieve this value
});
origOpen.apply(this, arguments);
};
})();
I am utilizing selenium's execute_script() to run the above code on the website. Is there a way for me to capture this.responseText
and store it in a variable?
Appreciate any guidance.