Skip to content

Conversation

mykola-mokhnach
Copy link
Contributor

Change list

Selenium4 declares that it only supports W3C and nevertheless still writes JWP's desiredCapabilities into createSession JSON. We should eliminate that.

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@mykola-mokhnach mykola-mokhnach changed the title refactor: Make sure we only write W3C payload into create session command [WIP] refactor: Make sure we only write W3C payload into create session command Oct 21, 2021
@mykola-mokhnach mykola-mokhnach changed the title [WIP] refactor: Make sure we only write W3C payload into create session command refactor: Make sure we only write W3C payload into create session command Oct 21, 2021
Copy link
Member

@SrinivasanTarget SrinivasanTarget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mykola-mokhnach mykola-mokhnach merged commit 811a66d into appium:master Oct 22, 2021
@mykola-mokhnach mykola-mokhnach deleted the payload_w3c branch October 22, 2021 12:44
Comment on lines +44 to +49
return possiblyInvalidCapabilities.asMap().entrySet().stream()
.map((entry) -> ACCEPTED_W3C_PATTERNS.test(entry.getKey())
? entry
: new AbstractMap.SimpleEntry<>(
String.format("%s%s", APPIUM_PREFIX, entry.getKey()), entry.getValue()))
.collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return possiblyInvalidCapabilities.asMap().entrySet().stream()
.map((entry) -> ACCEPTED_W3C_PATTERNS.test(entry.getKey())
? entry
: new AbstractMap.SimpleEntry<>(
String.format("%s%s", APPIUM_PREFIX, entry.getKey()), entry.getValue()))
.collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
return possiblyInvalidCapabilities.asMap().entrySet().stream()
.collect(ImmutableMap.toImmutableMap(
entry -> ACCEPTED_W3C_PATTERNS.test(entry.getKey()) ? entry.getKey() : APPIUM_PREFIX + entry.getKey(),
Map.Entry::getValue
));

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems I'm too late

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np, I could add it in the next PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants