@@ -60,18 +60,18 @@ private interface Option {
60
60
@ Deprecated
61
61
String TECHNOLOGY_PREVIEW = "technologyPreview" ;
62
62
63
- String AUTOMATIC_INSPECTION = "automaticInspection" ;
64
- String AUTOMATIC_PROFILING = "automaticProfiling" ;
63
+ // Defined by Apple
64
+ String AUTOMATIC_INSPECTION = "safari:automaticInspection" ;
65
+ String AUTOMATIC_PROFILING = "safari:automaticProfiling" ;
65
66
67
+ // Defined by us
66
68
String TECH_PREVIEW = "se:safari:techPreview" ;
67
69
}
68
70
69
71
private Map <String , Object > options = new TreeMap <>();
70
72
71
73
public SafariOptions () {
72
74
setUseTechnologyPreview (false );
73
- setAutomaticInspection (false );
74
- setAutomaticProfiling (false );
75
75
setCapability (BROWSER_NAME , "safari" );
76
76
}
77
77
@@ -129,7 +129,7 @@ public static SafariOptions fromCapabilities(Capabilities capabilities)
129
129
* otherwise will disable.
130
130
*/
131
131
public SafariOptions setAutomaticInspection (boolean automaticInspection ) {
132
- options . put (Option .AUTOMATIC_INSPECTION , automaticInspection );
132
+ setCapability (Option .AUTOMATIC_INSPECTION , automaticInspection );
133
133
return this ;
134
134
}
135
135
@@ -141,7 +141,7 @@ public SafariOptions setAutomaticInspection(boolean automaticInspection) {
141
141
* otherwise will disable.
142
142
*/
143
143
public SafariOptions setAutomaticProfiling (boolean automaticProfiling ) {
144
- options . put (Option .AUTOMATIC_PROFILING , automaticProfiling );
144
+ setCapability (Option .AUTOMATIC_PROFILING , automaticProfiling );
145
145
return this ;
146
146
}
147
147
@@ -186,11 +186,11 @@ public SafariOptions setProxy(Proxy proxy) {
186
186
// Getters
187
187
188
188
public boolean getAutomaticInspection () {
189
- return ( boolean ) options . getOrDefault ( Option .AUTOMATIC_INSPECTION , false );
189
+ return Boolean . TRUE . equals ( getCapability ( Option .AUTOMATIC_INSPECTION ) );
190
190
}
191
191
192
192
public boolean getAutomaticProfiling () {
193
- return ( boolean ) options . getOrDefault ( Option .AUTOMATIC_PROFILING , false );
193
+ return Boolean . TRUE . equals ( is ( Option .AUTOMATIC_PROFILING ) );
194
194
}
195
195
196
196
public boolean getUseTechnologyPreview () {
0 commit comments