Skip to content

Commit

Permalink
[java] Adding LOGGING_PREFS to Edge and Chrome options
Browse files Browse the repository at this point in the history
With that, users can switch to that cap instead of
using the deprecated one.
  • Loading branch information
diemol committed May 31, 2022
1 parent 1c2240d commit 52845c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/chrome/ChromeOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class ChromeOptions extends ChromiumOptions<ChromeOptions> {
* object.
*/
public static final String CAPABILITY = "goog:chromeOptions";
public static final String LOGGING_PREFS = "goog:loggingPrefs";
private ChromeDriverLogLevel logLevel;

public ChromeOptions() {
Expand Down
7 changes: 4 additions & 3 deletions java/src/org/openqa/selenium/edge/EdgeOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
// under the License.
package org.openqa.selenium.edge;

import static org.openqa.selenium.remote.Browser.EDGE;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.chromium.ChromiumOptions;
import org.openqa.selenium.remote.CapabilityType;

import static org.openqa.selenium.remote.Browser.EDGE;

/**
* Class to manage options specific to {@link EdgeDriver}.
*
Expand All @@ -44,10 +44,11 @@
public class EdgeOptions extends ChromiumOptions<EdgeOptions> {

/**
* Key used to store a set of ChromeOptions in a {@link Capabilities}
* Key used to store a set of EdgeOptions in a {@link Capabilities}
* object.
*/
public static final String CAPABILITY = "ms:edgeOptions";
public static final String LOGGING_PREFS = "ms:loggingPrefs";

public EdgeOptions() {
super(CapabilityType.BROWSER_NAME, EDGE.browserName(), CAPABILITY);
Expand Down
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/remote/CapabilityType.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public interface CapabilityType {

/**
* @deprecated Non W3C compliant
* Use {@link org.openqa.selenium.chrome.ChromeOptions#LOGGING_PREFS} or
* Use {@link org.openqa.selenium.edge.EdgeOptions#LOGGING_PREFS}
*/
@Deprecated
String LOGGING_PREFS = "loggingPrefs";
Expand Down

0 comments on commit 52845c3

Please sign in to comment.