Skip to content

Commit

Permalink
Stop propagating grid-specific capabilities and capabilities with nul…
Browse files Browse the repository at this point in the history
…l values to the driver
  • Loading branch information
barancev committed Dec 1, 2017
1 parent 7055d6f commit 9f5c1e8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.openqa.grid.shared.GridNodeServer;
import org.openqa.grid.web.servlet.DisplayHelpServlet;
import org.openqa.grid.web.servlet.beta.ConsoleServlet;
import org.openqa.selenium.ImmutableCapabilities;
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.SessionId;
import org.openqa.selenium.remote.server.handler.DeleteSession;
Expand All @@ -47,6 +48,7 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
import java.util.stream.Collectors;

import javax.servlet.Servlet;

Expand Down Expand Up @@ -205,6 +207,10 @@ private NewSessionPipeline createPipeline(StandaloneConfiguration configuration)
caps -> {
builder.addCapabilitiesMutator(new ChromeMutator(caps));
builder.addCapabilitiesMutator(new FirefoxMutator(caps));
builder.addCapabilitiesMutator(c -> new ImmutableCapabilities(c.asMap().entrySet().stream()
.filter(e -> ! e.getKey().startsWith("se:"))
.filter(e -> e.getValue() != null)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))));
}
);
}
Expand Down

0 comments on commit 9f5c1e8

Please sign in to comment.