Skip to content

Commit 52845c3

Browse files
committed
[java] Adding LOGGING_PREFS to Edge and Chrome options
With that, users can switch to that cap instead of using the deprecated one.
1 parent 1c2240d commit 52845c3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

java/src/org/openqa/selenium/chrome/ChromeOptions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class ChromeOptions extends ChromiumOptions<ChromeOptions> {
5151
* object.
5252
*/
5353
public static final String CAPABILITY = "goog:chromeOptions";
54+
public static final String LOGGING_PREFS = "goog:loggingPrefs";
5455
private ChromeDriverLogLevel logLevel;
5556

5657
public ChromeOptions() {

java/src/org/openqa/selenium/edge/EdgeOptions.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
// under the License.
1717
package org.openqa.selenium.edge;
1818

19-
import static org.openqa.selenium.remote.Browser.EDGE;
20-
2119
import org.openqa.selenium.Capabilities;
2220
import org.openqa.selenium.chromium.ChromiumOptions;
2321
import org.openqa.selenium.remote.CapabilityType;
2422

23+
import static org.openqa.selenium.remote.Browser.EDGE;
24+
2525
/**
2626
* Class to manage options specific to {@link EdgeDriver}.
2727
*
@@ -44,10 +44,11 @@
4444
public class EdgeOptions extends ChromiumOptions<EdgeOptions> {
4545

4646
/**
47-
* Key used to store a set of ChromeOptions in a {@link Capabilities}
47+
* Key used to store a set of EdgeOptions in a {@link Capabilities}
4848
* object.
4949
*/
5050
public static final String CAPABILITY = "ms:edgeOptions";
51+
public static final String LOGGING_PREFS = "ms:loggingPrefs";
5152

5253
public EdgeOptions() {
5354
super(CapabilityType.BROWSER_NAME, EDGE.browserName(), CAPABILITY);

java/src/org/openqa/selenium/remote/CapabilityType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ public interface CapabilityType {
115115

116116
/**
117117
* @deprecated Non W3C compliant
118+
* Use {@link org.openqa.selenium.chrome.ChromeOptions#LOGGING_PREFS} or
119+
* Use {@link org.openqa.selenium.edge.EdgeOptions#LOGGING_PREFS}
118120
*/
119121
@Deprecated
120122
String LOGGING_PREFS = "loggingPrefs";

0 commit comments

Comments
 (0)