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

DeviceRotation implementation #2482

Merged
merged 1 commit into from
Jul 19, 2016
Merged

DeviceRotation implementation #2482

merged 1 commit into from
Jul 19, 2016

Conversation

rafe-g
Copy link
Contributor

@rafe-g rafe-g commented Jul 17, 2016

@rafe-g
Copy link
Contributor Author

rafe-g commented Jul 17, 2016

@lukeis fixed my commits.

import java.util.Map;
import com.google.common.collect.ImmutableMap;

public class DeviceRotation {
Copy link
Member

Choose a reason for hiding this comment

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

This class will be consumed by users, please add JavaDoc to it and all public methods

@lukeis
Copy link
Member

lukeis commented Jul 17, 2016

@Rafael-Chavez which email do you want associated to the commit?

Also, you're going to need to add an implementation of calling this endpoint in the AddRotatable class. I don't like the way it's implemented there, but you don't need to change that, maybe changing the if/else if to a switch statement instead.
https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/AddRotatable.java#L36

@rafe-g
Copy link
Contributor Author

rafe-g commented Jul 18, 2016

@lukeis updated, please review.

} else if ("getOrientation".equals(method.getName())) {
return ScreenOrientation.valueOf((String) executeMethod.execute(
DriverCommand.GET_SCREEN_ORIENTATION, null));
RotatableMethod m = RotatableMethod.valueOf(method.getName());
Copy link
Member

Choose a reason for hiding this comment

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

you don't need to create a enum for this, java allows you to switch on a string ;) (since java 7?)

@rafe-g
Copy link
Contributor Author

rafe-g commented Jul 19, 2016

updated mobile spec here

@lukeis lukeis merged commit 380b2c6 into SeleniumHQ:master Jul 19, 2016
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.

2 participants