Fix the second argument type for pushFile by mykola-mokhnach · Pull Request #812 · appium/java-client

Conversation

@mykola-mokhnach

Change list

Fixes the second argument type for pushFile endpoint. Appium expects it to be base64-encoded string, but we send array of bytes instead.

Types of changes

  • No changes in production code.
  • 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

See appium/appium-xcuitest-driver#605

Mykola Mokhnach added 3 commits

January 17, 2018 09:13

SrinivasanTarget

valfirst

Object[] values = new Object[] {remotePath, base64Data};
String data;
try {
data = new String(base64Data, "UTF-8");

Choose a reason for hiding this comment

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

import java.nio.charset.StandardCharsets;
...
data = new String(base64Data, StandardCharsets.UTF_8)

?

Choose a reason for hiding this comment

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

np

Mykola Mokhnach added 2 commits

January 17, 2018 20:40