Hello i am trying to using same code to retrieve performance log from both Chrome and Edge to scan for errors , however for edge i am getting org.openqa.selenium.InvalidArgumentException: invalid argument: log type 'performance' not found (Session info: MicrosoftEdge=96.0.1054.34)
case "EDGE":
System.out.println("Launching Edge Browser");
HashMap<String, Object> EdgePrefs = new HashMap<String, Object>();
EdgePrefs.put("profile.default_content_settings.popups", 0);
EdgePrefs.put("download.default_directory", downloadPath);
EdgeOptions Edgeoptions = new EdgeOptions();
Edgeoptions.setCapability("prefs", EdgePrefs);
Edgeoptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
LoggingPreferences EdgelogPrefs = new LoggingPreferences();
EdgelogPrefs.enable(LogType.PERFORMANCE, Level.ALL);
EdgelogPrefs.enable(LogType.DRIVER, Level.ALL);
EdgelogPrefs.enable(LogType.BROWSER, Level.ALL);
Edgeoptions.setCapability("enableNetwork",true);
Edgeoptions.setCapability(CapabilityType.LOGGING_PREFS, EdgelogPrefs);
Edgeoptions.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS,true);
WebDriverManager.edgedriver().setup();
driver = new EdgeDriver(Edgeoptions);
driver.manage().timeouts().implicitlyWait(TimeOut,TimeUnit.SECONDS);
driver.manage().window().maximize();
break;
Code to retrieve the performance log
LogEntries logs = WD.manage().logs().get("performance");
This line of code cause the org.openqa.selenium.InvalidArgumentException: invalid argument: log type 'performance' not found (Session info: MicrosoftEdge=96.0.1054.34)