Skip to content

Commit

Permalink
Remove deprecated AugmenterProviders
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Nov 1, 2018
1 parent f7c4f70 commit c3a4a4b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 158 deletions.
49 changes: 0 additions & 49 deletions java/client/src/org/openqa/selenium/remote/AddFindsByCss.java

This file was deleted.

51 changes: 0 additions & 51 deletions java/client/src/org/openqa/selenium/remote/AddFindsChildByCss.java

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions java/client/src/org/openqa/selenium/remote/BUCK
Expand Up @@ -49,9 +49,6 @@ java_library(name = 'remote',
srcs = [
'Augmenter.java',
'AugmenterProvider.java',
'AddFindsByCss.java',
'AddFindsChildByCss.java',
'AddRemoteTouchScreen.java',
'AddRotatable.java',
'BaseAugmenter.java',
'InterfaceImplementation.java',
Expand Down
19 changes: 5 additions & 14 deletions java/client/src/org/openqa/selenium/remote/BaseAugmenter.java
Expand Up @@ -25,6 +25,7 @@
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_NETWORK_CONNECTION;
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_WEB_STORAGE;

import org.openqa.selenium.Beta;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.html5.AddApplicationCache;
Expand All @@ -47,24 +48,17 @@ public abstract class BaseAugmenter {
private final Map<String, AugmenterProvider> elementAugmentors = new HashMap<>();

public BaseAugmenter() {
addDriverAugmentation(SUPPORTS_FINDING_BY_CSS, new AddFindsByCss());
addDriverAugmentation(SUPPORTS_LOCATION_CONTEXT, new AddLocationContext());
addDriverAugmentation(SUPPORTS_APPLICATION_CACHE, new AddApplicationCache());
addDriverAugmentation(SUPPORTS_NETWORK_CONNECTION, new AddNetworkConnection());
addDriverAugmentation(SUPPORTS_WEB_STORAGE, new AddWebStorage());
addDriverAugmentation(ROTATABLE, new AddRotatable());
addDriverAugmentation(HAS_TOUCHSCREEN, new AddRemoteTouchScreen());

addElementAugmentation(SUPPORTS_FINDING_BY_CSS, new AddFindsChildByCss());
}

/**
* Add a mapping between a capability name and the implementation of the interface that name
* represents for instances of {@link org.openqa.selenium.WebDriver}. For example (@link
* CapabilityType#SUPPORTS_FINDING_BY_CSS} represents the interface
* {@link org.openqa.selenium.internal.FindsByCssSelector}, which is implemented via the
* {@link org.openqa.selenium.remote.AddFindsByCss} provider.
*
* represents for instances of {@link org.openqa.selenium.WebDriver}.
*<p>
* Note: This method is still experimental. Use at your own risk.
*
* @param capabilityName The name of the capability to model
Expand All @@ -76,11 +70,8 @@ public void addDriverAugmentation(String capabilityName, AugmenterProvider handl

/**
* Add a mapping between a capability name and the implementation of the interface that name
* represents for instances of {@link org.openqa.selenium.WebElement}. For example (@link
* CapabilityType#SUPPORTS_FINDING_BY_CSS} represents the interface
* {@link org.openqa.selenium.internal.FindsByCssSelector}, which is implemented via the
* {@link AddFindsByCss} provider.
*
* represents for instances of {@link org.openqa.selenium.WebElement}.
* <p>
* Note: This method is still experimental. Use at your own risk.
*
* @param capabilityName The name of the capability to model
Expand Down
Expand Up @@ -122,7 +122,7 @@ public void shouldNotAugmentRemoteWebDriverWithoutExtraCapabilities() {

@Test
public void shouldAugmentRemoteWebDriverWithExtraCapabilities() {
Capabilities caps = new ImmutableCapabilities(CapabilityType.SUPPORTS_FINDING_BY_CSS, true);
Capabilities caps = new ImmutableCapabilities(CapabilityType.SUPPORTS_WEB_STORAGE, true);
StubExecutor stubExecutor = new StubExecutor(caps);
WebDriver driver = new RemoteWebDriver(stubExecutor, caps);

Expand Down

0 comments on commit c3a4a4b

Please sign in to comment.