I want to get information from a embedded JavaScript game. I navigate to the website via selenium and perform a few clicks based on the position of the js field. This works fine so far.
My problem is that I can't get any xhr response. I want to save the full response as a JSON. I already tried with requests but end up with error 400. I tried with postman but always error 400. I tried to get the full log but there I can only see the request itself not the full response.
When I inspect the page for navigation with selenium the last I can really get hands on is the field which holds the js. Inside is only a canvas call for unity.
I'm fairly new to this, maybe I just missed something.
CodePudding user response:
You can't get XHR responses using the standard Selenium. What I used to solve this issue is selenium-wire, you can inspect requests and responses using the API provided by it.