I am trying to get the JSON trace of WebRTC internals from Selenium, in Java. I already read the guides here:
-
https://testrtc.com/webrtc-internals-parameters/
My Selenium code to get the dump is just:
Object stats = driver.executeAsyncScript( //
"var callback = arguments[arguments.size - 1];" + //
"var pc = new RTCPeerConnection();" + //
"pc.getStats().then(result => { callback(result); });");
log.info(stats.toString());
The script always timeouts. Is it possible to get this to work?
TIA for any help.