1717
1818package org .openqa .selenium .safari ;
1919
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+
2024import com .google .auto .service .AutoService ;
25+
2126import org .openqa .selenium .Capabilities ;
2227import org .openqa .selenium .Platform ;
2328import org .openqa .selenium .WebDriverException ;
3136import java .util .List ;
3237import java .util .Map ;
3338
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-
3839public class SafariDriverService extends DriverService {
3940
4041 /**
@@ -45,14 +46,6 @@ public class SafariDriverService extends DriverService {
4546
4647 private static final File SAFARI_DRIVER_EXECUTABLE = new File ("/usr/bin/safaridriver" );
4748
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-
5649 public SafariDriverService (
5750 File executable ,
5851 int port ,
@@ -71,11 +64,7 @@ public SafariDriverService(
7164 }
7265
7366 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 ();
7968 }
8069
8170 @ Override
@@ -91,8 +80,6 @@ protected void waitUntilAvailable() {
9180 public static class Builder extends DriverService .Builder <
9281 SafariDriverService , SafariDriverService .Builder > {
9382
94- private boolean useTechnologyPreview = false ;
95-
9683 @ Override
9784 public int score (Capabilities capabilities ) {
9885 int score = 0 ;
@@ -106,22 +93,11 @@ public int score(Capabilities capabilities) {
10693 return score ;
10794 }
10895
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-
11896 @ Override
11997 protected File findDefaultExecutable () {
12098 File exe ;
12199 if (System .getProperty (SAFARI_DRIVER_EXE_PROPERTY ) != null ) {
122100 exe = new File (System .getProperty (SAFARI_DRIVER_EXE_PROPERTY ));
123- } else if (useTechnologyPreview ) {
124- exe = TP_SAFARI_DRIVER_EXECUTABLE ;
125101 } else {
126102 exe = SAFARI_DRIVER_EXECUTABLE ;
127103 }
0 commit comments