Skip to content

Commit

Permalink
Remove Safari specific new window feature which no longer works; w3c …
Browse files Browse the repository at this point in the history
…compliant endpoint is available
  • Loading branch information
titusfortner committed Sep 21, 2021
1 parent f8e643f commit e49e621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 62 deletions.
27 changes: 2 additions & 25 deletions java/src/org/openqa/selenium/safari/SafariDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@

package org.openqa.selenium.safari;

import static java.util.Collections.singletonMap;

import org.openqa.selenium.Beta;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.FileDetector;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.Response;
import org.openqa.selenium.remote.service.DriverCommandExecutor;

/**
* A WebDriver implementation that controls Safari using a browser extension
Expand Down Expand Up @@ -78,7 +75,7 @@ public SafariDriver(SafariDriverService safariService) {
* @param safariOptions safari specific options / capabilities for the driver
*/
public SafariDriver(SafariDriverService safariServer, SafariOptions safariOptions) {
super(new SafariDriverCommandExecutor(safariServer), safariOptions);
super(new DriverCommandExecutor(safariServer), safariOptions);
}

@Override
Expand All @@ -87,24 +84,4 @@ public void setFileDetector(FileDetector detector) {
"Setting the file detector only works on remote webdriver instances obtained " +
"via RemoteWebDriver");
}

/**
* Open either a new tab or window, depending on what is requested, and return the window handle
* without switching to it.
*
* @return The handle of the new window.
*/
@Beta
public String newWindow(WindowType type) {
Response response = execute(
"SAFARI_NEW_WINDOW",
singletonMap("newTab", type == WindowType.TAB));

return (String) response.getValue();
}

public enum WindowType {
TAB,
WINDOW,
}
}

This file was deleted.

0 comments on commit e49e621

Please sign in to comment.