3

I have data that I need to extract from chromes console log using java and selenium, im using

LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.BROWSER, Level.ALL);
logPrefs.enable(LogType.BROWSER, Level.parse("ALL"));
options.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);

and currently its showing in my intellij console as

DB432DDBCEE8E8543DDA785A9B46F11B {
"node": {
  "attributes": [ "src", "im://launch?iss=http%3A%2F%2Fukdc1-docker-mx%3A8084%2Fimsauth%2Ffhir&launch=%7B%22authToken%22%3A%22eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMTQyIiwiaWF0IjoxNjUxNTkzMTU0LCJleHAiOjE2NTE2Nzk1N...", "style", "display: none;" ],
  "backendNodeId": 299,
  "childNodeCount": 0,
  "localName": "iframe",
  "nodeId": 250,
  "nodeName": "IFRAME",
  "nodeType": 1,
  "nodeValue": ""
},
"parentNodeId": 86,
"previousNodeId": 244
}

and im trying to get the attributes value and use it as a string, I've tried

logPrefs().toString;
logPrefs().toJson;

but cant get past it just showing in teh console, any ideas?

user9686029
  • 252
  • 1
  • 2
  • 11

0 Answers0