3

Is it possible to copy and paste a string using Selendroid / Appium on an Android testing device?

I'm trying to work out how to use sendKeys to an input on an app that uses non-English characters (Arabic, Russian, Portuguese etc) -- from what I can find, it's not really possible to run a system keyboard with multiple languages (SwiftKey does 3, but it still doesn't seem to respond with sendKeys), and so a viable solution for me was to copy the string (as I have it on the server side) and then paste it into the text box.

How do I send these commands (copy/paste)? Is it possible?

FYI my test is in Java, but a solution in any language is very much welcome :)

Cheers!

donfuxx
  • 11,277
  • 6
  • 44
  • 76

2 Answers2

0

I'm not sure if it works for Android too, but I needed something similar for iOS testing with Appium.

You might have the strings (your special chars you need) in a seperate text document. Then you open it with java File = ... save it into a variable and use it then with .sendKeys(string).

Don't know if that's working, sendKeys might be restricted to the chars you can use with the android keyboard.

0

You can use the getText method to get the text and save it in a variable and clear the text and then set the text that you saved in the destination.

qazimusab
  • 1,031
  • 1
  • 7
  • 14