There is no space between input text and the actual text to be typed.
public void input(String text) {
try {
text = text.replaceAll("\\s+", "%s");
device.executeShell("input text ", text);
RunTime.pause(text.length() * inputDelay);
} catch (Exception e) {
log(-1, "input: %s", e);
}
}
Also I'm replacing all the spaces with %s, otherwise adb server will raise an error.
To test them I changed org.sikuli.android.ADBTest.basicTest to the following:
reported by https:/ /github. com/kainecy /github. com/RaiMan/ SikuliX- 2014/issues/ 210#issuecommen t-278236117 ------- ------- -----
at https:/
-------
There is no space between input text and the actual text to be typed.
public void input(String text) { ("\\s+" , "%s"); executeShell( "input text ", text); pause(text. length( ) * inputDelay);
try {
text = text.replaceAll
device.
RunTime.
} catch (Exception e) {
log(-1, "input: %s", e);
}
}
Also I'm replacing all the spaces with %s, otherwise adb server will raise an error.
To test them I changed org.sikuli. android. ADBTest. basicTest to the following:
private static void basicTest(ADBScreen adbs) throws FindFailed { aSwipeLeft( ); aSwipeRight( ); e("Android" ); save(RunTime. get().fSikulixS tore.getAbsolut ePath() , "android"); e("Android" ); save(RunTime. get().fSikulixS tore.getAbsolut ePath() , "android"); aInput( "Hello world");
log(lvl, "**************** running basic test");
adbs.
adbs.
adbs.wait(1f);
ScreenImage sIMg = adbs.userCaptur
sIMg.
Image img = new Image(sIMg);
adbs.aTap(img);
adbs.wait(1f);
sIMg = adbs.userCaptur
sIMg.
img = new Image(sIMg);
adbs.aTap(img);
adbs.wait(1f);
adbs.
}