How to modify wd proxy and uiautomator2 source code (to support unicode)

I did fresh install again
If I don’t want use git, after editing code exactly like your branch, should build or rerunning appium is enough ?
if just editing is enough, so escapeArg function didn’t called.

Simple editing won’t work, since the code needs to be transpiled prior to execution (e.g. stuff from lib gets transpiled to build). You could theoretically edit it in-place, but then it would be necessary to change already transpiled code in build folder, which is not very convenient for human interaction.

Thanks for you help
I transpiled code with a tool(https://babeljs.io/repl)
2 problems:
1-you escaped space by %s, and escaped % by %%, so a %%s appears in text
2- it needs to have ’ ’ around text, but didn’t added in command
log:
[ADB] Running ‘C:\android-sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:62040 shell input text ^&BioGMwYq-%%s^&BioGMwYq-’

Does it help to not escape %s? What if I do not replace spaces at all?

I don’t know why but this code is working:
function escapeArg(arg) {
return “\’” +${arg} + “\’”;
}

javascript finally kills me!!!

log:
[ADB] Running ‘C:\android-sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:62040 shell input text ‘&BioGMwYq-%s&BioGMwYq-’’

but adb manually needs one of these:
C:\Users\user>C:\android-sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:62040 s
hell input text ‘^&BioGMwYq-%s^&BioGMwYq-’

C:\Users\user>C:\android-sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:62040 s
hell input text ‘^&BioGMwYq- ^&BioGMwYq-’

The patch has been merged and published to appium@beta

Thanks
I removed appium using uninstaller.exe and installed beta using this command:

npm install -g appium@beta

nothing to execute after that? what should I do to test your beta version?

I installed your code manually
It works well
thanks

1 Like