Skip to content

Commit

Permalink
[java] Removing makeW3CSafe from NewSession CommandPayload
Browse files Browse the repository at this point in the history
Helps with #10374
  • Loading branch information
diemol committed Jul 5, 2022
1 parent 0c2b605 commit daa0423
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions java/src/org/openqa/selenium/remote/DriverCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import static java.util.Collections.singletonMap;

Expand Down Expand Up @@ -177,7 +176,7 @@ static CommandPayload NEW_SESSION(Capabilities capabilities) {
return new CommandPayload(
NEW_SESSION,
ImmutableMap.of(
"capabilities", CapabilitiesUtils.makeW3CSafe(capabilities).collect(Collectors.toSet()),
"capabilities", capabilities,
"desiredCapabilities", capabilities));
}

Expand All @@ -191,7 +190,7 @@ static CommandPayload NEW_SESSION(Collection<Capabilities> capabilities) {
NEW_SESSION,
ImmutableMap.of(
"capabilities",
capabilities.stream().flatMap(CapabilitiesUtils::makeW3CSafe).collect(Collectors.toSet()),
capabilities,
"desiredCapabilities", capabilities.iterator().next()));
}

Expand Down

0 comments on commit daa0423

Please sign in to comment.