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

Addition to #846 and #855: #869

Merged
merged 2 commits into from
Apr 18, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ default void setClipboardText(String text) {
*/
default String getClipboardText() {
byte[] base64decodedBytes = Base64
.getDecoder()
.getMimeDecoder()
Copy link
Member

Choose a reason for hiding this comment

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

Did suggested this in last PR. How did i missed it. Good catch @TikhomirovSergey

Copy link
Member

Choose a reason for hiding this comment

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

@mykola-mokhnach Last time when i locally built Appium's WDA(Forked) and tested clipboard of URL's where passing in iOS after your fix here but now i upgraded my XCUI driver to latest release but URL's stopped working after that.

URL's are working only if i use mime decoding for URL.

Copy link
Member

Choose a reason for hiding this comment

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

Can you make mime decoding for getClipboardUrl too? Else it is failing...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SrinivasanTarget Will make that today

.decode(getClipboard(ClipboardContentType.PLAINTEXT));
return new String(base64decodedBytes, StandardCharsets.UTF_8);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.openqa.selenium.remote.http.HttpClient;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.W3CHttpCommandCodec;
import org.openqa.selenium.remote.internal.ApacheHttpClient;
import org.openqa.selenium.remote.internal.OkHttpClient;
import org.openqa.selenium.remote.service.DriverService;

import java.io.IOException;
Expand Down Expand Up @@ -70,12 +70,12 @@ public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,

public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,
URL addressOfRemoteServer) {
this(additionalCommands, addressOfRemoteServer, new ApacheHttpClient.Factory());
this(additionalCommands, addressOfRemoteServer, new OkHttpClient.Factory());
}

public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,
DriverService service) {
this(additionalCommands, service, new ApacheHttpClient.Factory());
this(additionalCommands, service, new OkHttpClient.Factory());
}

private <B> B getPrivateFieldValue(String fieldName, Class<B> fieldType) {
Expand Down