RSelenium icon indicating copy to clipboard operation
RSelenium copied to clipboard

Trying to monitor xhr requests (maybe with captureNetworkTraffic = TRUE)

Open xvrdm opened this issue 6 years ago • 0 comments

Operating System

Mac OS Mojave

Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)

Selenium server version: 3.141.59, revision: e82be7d358

Other driver version

$chrome$chromedriverVersion
[1] "72.0.3626.7 

Expected behaviour

I am trying to monitor and extract the payload of an xhr request. I tried to use the option captureNetworkTraffic=true as described in this SO question (might be completely outdated...).

eCaps <- list(chromeOptions = list(
  args = c('--headless', '--disable-gpu', '--window-size=1280,800')),
  captureNetworkTraffic = TRUE)

rD    <- rsDriver(port = 4565L, extraCapabilities = eCaps)
remDr <- rD$client

Currently I am trying it with Chrome Headless but could use something else if needed. I tried to not go the PhantomJS way as the project seems to be inactive.

Actual behaviour

It doesn't look like you can access the captureNetworkTraffic() method, neither on the client() nor on the rsDriver.

Thanks a lot for the awesome library!

xvrdm avatar Dec 17 '18 15:12 xvrdm