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

Added Android device commands #518

Merged
merged 26 commits into from
Nov 26, 2016
Merged

Added Android device commands #518

merged 26 commits into from
Nov 26, 2016

Conversation

SrinivasanTarget
Copy link
Member

@SrinivasanTarget SrinivasanTarget commented Nov 19, 2016

Change list

Added Android device commands

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • 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)

Details

Added Android device commands

isKeyboardShown
getDisplayDensity
getSystemBars

Added,
io.appium.java_client.android.IsKeyboardShown API and
io.appium.java_client.HasDeviceDetails API.

@TikhomirovSergey Please review

SrinivasanTarget and others added 20 commits August 12, 2016 00:13
- new interfaces were added
- deprecated API
- new methods were added to MultiTouchAction
- AppiumDriver methods which perform multiple touch actions were marked as Deprecated
 - Constructors of TouchAction and MultiTouchAction were changed. Now it accepts any instance that can perform touch action and multiple touch actions.
- the new interface CreatesSwipeAction was added.

- the reversion of last changes of TouchableElement.

- the `swipe` is deprecated method.
Forgot to commit this change
- CreatesSwipeAction API was implemented
- SwipeElementDirection was redesigned
- constructors of TouchAction and MultiTouchAction were improved.
- IOSSwipeGestureTest was added
- the swiping combined with the tapping.
Fixed Codacy errors

Fixed Codacy errors
…ikhomirovSergey-SrinivasanTarget-TouchActionSplitting
@SrinivasanTarget
Copy link
Member Author

@imurchie Can you please check this? https://gist.github.com/SrinivasanTarget/d564095d2009779bed69a2d6ef8f0b8e.

I'm running from source with latest android driver and base driver.

@imurchie
Copy link
Contributor

@SrinivasanTarget This should be a GET request. https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L333

@SrinivasanTarget
Copy link
Member Author

SrinivasanTarget commented Nov 22, 2016

@TikhomirovSergey Have fixed this PR. Tested this on Android 6.0 and it works as expected.

Refractoring
@TikhomirovSergey
Copy link
Contributor

This PR is in the conflicted state

@SrinivasanTarget
Copy link
Member Author

Yup @TikhomirovSergey Will close this and raise a new one probably in sometime.

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey I have rebased this to master and fixed the conflicts now.


import java.util.Map;

public interface HasDeviceDetails extends ExecutesMethod {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that methods that declared by this interface are Android-specific. Please take a look at
https://github.com/search?q=org%3Aappium+DISPLAY+DENSITY&type=Code

https://github.com/search?q=org%3Aappium+GET+SYSTEM+BARS&type=Code

I think it has more sense to move this interface to the io.appium.java_client.android

import io.appium.java_client.CommandExecutionHelper;
import io.appium.java_client.ExecutesMethod;

public interface IsKeyboardShown extends ExecutesMethod {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it has more sense to unite this interface with HasDeviceDetails

@@ -63,4 +65,10 @@ public void setup() throws Exception {
+ "new UiSelector().text(\"Radio Group\"));");
assertNotNull(radioGroup.getLocation());
}

@Test public void deviceDetailsAndKeyboardTest() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this method is here? Maybe it has more sense to move it to AndroidDriverTest

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey Fixed review comments now

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey Ping

@TikhomirovSergey TikhomirovSergey merged commit 24c7747 into appium:master Nov 26, 2016
@SrinivasanTarget SrinivasanTarget deleted the AndroidDeviceCommands branch February 25, 2017 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants