Skip to content
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

Create interfaces for RemoteWebDriver to use with Augmenter #9856

Merged
merged 13 commits into from
Sep 28, 2021

Conversation

titusfortner
Copy link
Member

@titusfortner titusfortner commented Sep 21, 2021

This is similar to what we did for the Firefox capabilities, but I'm implementing, but I'm not sure this is the best way to do this (i.e. with the ChromiumNetworkConditions class). Would be a lot simpler to do ordered parameters, but this lets users only specify the things they care about.

Edit: I'm just going to add everything here to get feedback on it all.

@titusfortner titusfortner requested a review from shs96c September 21, 2021 06:25
@titusfortner titusfortner self-assigned this Sep 21, 2021
@titusfortner titusfortner changed the title Implement Network Conditions for Chromium both local and remote drivers Create interfaces for RemoteWebDriver to use with Augmenter Sep 22, 2021
@titusfortner titusfortner force-pushed the java_add_augmented branch 8 times, most recently from c0bee02 to d706012 Compare September 23, 2021 04:12
java/src/org/openqa/selenium/chromium/AddHasCdp.java Outdated Show resolved Hide resolved
java/src/org/openqa/selenium/chromium/AddHasCdp.java Outdated Show resolved Hide resolved
java/src/org/openqa/selenium/chromium/AddHasCdp.java Outdated Show resolved Hide resolved
java/src/org/openqa/selenium/safari/HasPermissions.java Outdated Show resolved Hide resolved
titusfortner added a commit to titusfortner/selenium that referenced this pull request Sep 23, 2021
@titusfortner
Copy link
Member Author

I marked all the conversations as resolved for the things I fixed in the most recent commit. These others seem slightly more involved, but I'll see what I can make of them tonight so we can discuss tomorrow.

@sonarcloud
Copy link

sonarcloud bot commented Sep 28, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 22 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

Let's get this in, and then we can iterate on the nits.

@Override
public HasCasting getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) {
return new HasCasting() {
@Override public List<Map<String, String>> getCastSinks() {
Copy link
Member

Choose a reason for hiding this comment

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

Style nit: put the @Override on its own line. What you've got here compiles, but it's not the style we follow on the project.



private static final Map<String, CommandInfo> COMMANDS = ImmutableMap.of(
GET_NETWORK_CONDITIONS, new CommandInfo("/session/:sessionId/chromium/network_conditions",HttpMethod.GET),
Copy link
Member

Choose a reason for hiding this comment

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

Nit: a space after the , -> ", HttpMethod.GET)

* @param parameters any information needed to execute the Dev Tools command.
* @return the name and value of the response.
*/
public Map<String, Object> executeCdpCommand(String commandName, Map<String, Object> parameters);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Methods on interfaces are public by default.

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

Successfully merging this pull request may close these issues.

2 participants