-
-
Notifications
You must be signed in to change notification settings - Fork 768
refactor: Make sure we only write W3C payload into create session command #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
)); |
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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