17
17
18
18
package org .openqa .selenium .safari ;
19
19
20
- import static java .util .Collections .singletonMap ;
21
-
22
- import org .openqa .selenium .Beta ;
23
20
import org .openqa .selenium .Capabilities ;
24
21
import org .openqa .selenium .WebDriverException ;
25
22
import org .openqa .selenium .remote .FileDetector ;
26
23
import org .openqa .selenium .remote .RemoteWebDriver ;
27
- import org .openqa .selenium .remote .Response ;
24
+ import org .openqa .selenium .remote .service . DriverCommandExecutor ;
28
25
29
26
/**
30
27
* A WebDriver implementation that controls Safari using a browser extension
@@ -78,7 +75,7 @@ public SafariDriver(SafariDriverService safariService) {
78
75
* @param safariOptions safari specific options / capabilities for the driver
79
76
*/
80
77
public SafariDriver (SafariDriverService safariServer , SafariOptions safariOptions ) {
81
- super (new SafariDriverCommandExecutor (safariServer ), safariOptions );
78
+ super (new DriverCommandExecutor (safariServer ), safariOptions );
82
79
}
83
80
84
81
@ Override
@@ -87,24 +84,4 @@ public void setFileDetector(FileDetector detector) {
87
84
"Setting the file detector only works on remote webdriver instances obtained " +
88
85
"via RemoteWebDriver" );
89
86
}
90
-
91
- /**
92
- * Open either a new tab or window, depending on what is requested, and return the window handle
93
- * without switching to it.
94
- *
95
- * @return The handle of the new window.
96
- */
97
- @ Beta
98
- public String newWindow (WindowType type ) {
99
- Response response = execute (
100
- "SAFARI_NEW_WINDOW" ,
101
- singletonMap ("newTab" , type == WindowType .TAB ));
102
-
103
- return (String ) response .getValue ();
104
- }
105
-
106
- public enum WindowType {
107
- TAB ,
108
- WINDOW ,
109
- }
110
87
}
0 commit comments