I am using Selenium with Java.
I am trying to verify that a specific third party request came in so in order to capture the network traffic I used a proxy named BrowserMobProxy. I wrote the content of the request into a HAR like this:
proxy.newHar("Something");
Har har = proxy.getHar();
try {
har.writeTo(new File("Blah.json"));
} catch (IOException e) {
e.printStackTrace();
}
My question is,
instead of having to write into a file,
- in order to verify that a specific request came in
- is there a more concise way to do this similar to
proxy.getHar().contains
("whatever you are searching for... ")?