Skip to content

The complete #215 fix and addition to #403 #441

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

Merged
merged 1 commit into from
Jul 18, 2016
Merged

The complete #215 fix and addition to #403 #441

merged 1 commit into from
Jul 18, 2016

Conversation

TikhomirovSergey
Copy link
Contributor

Change list

The complete #215 fix and addition to #403:

  • The fix of the bug which has not been caught.
  "status": 0,
  "value": {
    "platform": "LINUX",
    "webStorageEnabled": false,
    "takesScreenshot": true,
    "javascriptEnabled": true,
    "databaseEnabled": false,
    "networkConnectionEnabled": true,
    "locationContextEnabled": false,
    "warnings": {

    },
    "desired": {
      "app": "\/Users\/saikrisv\/git\/java-client\/java-client\/src\/test\/java\/io\/appium\/java_client\/IntentExample.apk",
      "platformName": "Android",
      "deviceName": "Android Emulator"
    },
    "app": "\/Users\/saikrisv\/git\/java-client\/java-client\/src\/test\/java\/io\/appium\/java_client\/IntentExample.apk",
    "platformName": "Android",
    "deviceName": "192.168.65.101:5555",
    "deviceUDID": "192.168.65.101:5555",
    "platformVersion": "5.0",
    "appPackage": "com.prgguru.android",
    "appWaitPackage": "com.prgguru.android",
    "appActivity": "com.prgguru.android.IntentExampleActivity",
    "appWaitActivity": "com.prgguru.android.IntentExampleActivity"
  },
  "sessionId": "0ac42e16-65c3-40ec-bcf0-fae7d9dd9a4a"
}

If invoke

driver.getSessionDetails().get("desired");

then it throws

java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to java.lang.String

    at io.appium.java_client.android.AndroidDriverTest.getDeviceUDIDTest(AndroidDriverTest.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Also it is possible that the result would contain Integer, Boolean and other values.
The method returns a Map<String, Object> now.

  • an additional test was added

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

I was intending to close the #215. At that moment I found a bug.

The bug which has not been caught previously was worked out.
@TikhomirovSergey TikhomirovSergey added this to the 4.1.0 milestone Jul 16, 2016
@TikhomirovSergey
Copy link
Contributor Author

@saikrishna321@SrinivasanTarget
Could you review this PR?

@saikrishna321
Copy link
Member

@TikhomirovSergey good catch, looks fine to me 👍 Ping @SrinivasanTarget

@SrinivasanTarget
Copy link
Member

@TikhomirovSergey Good Catch LGTM 👍

@SrinivasanTarget SrinivasanTarget merged commit 36f7dcf into appium:master Jul 18, 2016
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.

3 participants