17
17
18
18
package org .openqa .selenium .safari ;
19
19
20
+ import static java .util .concurrent .TimeUnit .MILLISECONDS ;
21
+ import static org .openqa .selenium .Platform .MAC ;
22
+ import static org .openqa .selenium .remote .Browser .SAFARI ;
23
+
20
24
import com .google .auto .service .AutoService ;
25
+
21
26
import org .openqa .selenium .Capabilities ;
22
27
import org .openqa .selenium .Platform ;
23
28
import org .openqa .selenium .WebDriverException ;
31
36
import java .util .List ;
32
37
import java .util .Map ;
33
38
34
- import static java .util .concurrent .TimeUnit .MILLISECONDS ;
35
- import static org .openqa .selenium .Platform .MAC ;
36
- import static org .openqa .selenium .remote .Browser .SAFARI ;
37
-
38
39
public class SafariDriverService extends DriverService {
39
40
40
41
/**
@@ -45,14 +46,6 @@ public class SafariDriverService extends DriverService {
45
46
46
47
private static final File SAFARI_DRIVER_EXECUTABLE = new File ("/usr/bin/safaridriver" );
47
48
48
- /**
49
- * @deprecated Directly use {@link SafariTechPreviewDriverService}
50
- * Remove after deprecation policy is fulfilled
51
- */
52
- @ Deprecated
53
- private static final File TP_SAFARI_DRIVER_EXECUTABLE =
54
- new File ("/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" );
55
-
56
49
public SafariDriverService (
57
50
File executable ,
58
51
int port ,
@@ -71,11 +64,7 @@ public SafariDriverService(
71
64
}
72
65
73
66
public static SafariDriverService createDefaultService () {
74
- return createDefaultService (new SafariOptions ());
75
- }
76
-
77
- static SafariDriverService createDefaultService (SafariOptions options ) {
78
- return new Builder ().usingTechnologyPreview (options .getUseTechnologyPreview ()).build ();
67
+ return new Builder ().build ();
79
68
}
80
69
81
70
@ Override
@@ -91,8 +80,6 @@ protected void waitUntilAvailable() {
91
80
public static class Builder extends DriverService .Builder <
92
81
SafariDriverService , SafariDriverService .Builder > {
93
82
94
- private boolean useTechnologyPreview = false ;
95
-
96
83
@ Override
97
84
public int score (Capabilities capabilities ) {
98
85
int score = 0 ;
@@ -106,22 +93,11 @@ public int score(Capabilities capabilities) {
106
93
return score ;
107
94
}
108
95
109
- /**
110
- * @deprecated Directly use {@link SafariTechPreviewDriverService}
111
- */
112
- @ Deprecated
113
- public SafariDriverService .Builder usingTechnologyPreview (boolean useTechnologyPreview ) {
114
- this .useTechnologyPreview = useTechnologyPreview ;
115
- return this ;
116
- }
117
-
118
96
@ Override
119
97
protected File findDefaultExecutable () {
120
98
File exe ;
121
99
if (System .getProperty (SAFARI_DRIVER_EXE_PROPERTY ) != null ) {
122
100
exe = new File (System .getProperty (SAFARI_DRIVER_EXE_PROPERTY ));
123
- } else if (useTechnologyPreview ) {
124
- exe = TP_SAFARI_DRIVER_EXECUTABLE ;
125
101
} else {
126
102
exe = SAFARI_DRIVER_EXECUTABLE ;
127
103
}
0 commit comments