I am currently starting automated testing in robot framework. As part of this I need to go to a demo page and click on a button. The click event triggers a network request to our server which returns whether or not agents are available. I need a way of intercepting or mocking the response and putting it in place of what is passed back from the server. I have a flask endpoint that I've set up going to the same location as the server and I'm returning a correct response, but I don't know how I go about patching that "mock" response in place of what is on the browser session. Any help would be appreciated.
I have set up a flask endpoint which returns the correct response, but haven't been able to figure out how I'm supposed to put that in place of the response in the browser. I've tried looking at using mock server, but it was deemed overly complicated for what I was trying to do with it by the other devs. I have checked several different locations but I don't even know if I'm asking the right questions here, I just know that everything I have tried for the past week has resulted in me having got nowhere