Wednesday, 2 October 2019

Capture Network XHR logs(request/response with parameters) with Selenium

I tried to capture Network XHR logs (chrome browser) that generally shows Request(MethodType, Headers, parameters) and Response with Selenium webdriver but i was only able to get api's request that client sent to server(without parameter), while searching i found below code and it only provides me apis request:-

LogEntries logEntries = driver.manage().logs().get(LogType.BROWSER);
          for (LogEntry entry : logEntries) {
            System.out.println(new Date(entry.getTimestamp()) + " " + entry.getLevel() + " " + entry.getMessage())
}

But i want to get also all the parameters that sent by client(browser) to server and also response. *how the same feature will work for firefox.

Thanks in advance!!



from Capture Network XHR logs(request/response with parameters) with Selenium

No comments:

Post a Comment