[1.1.1] Android - ADB: input, tap and getDisplayDimension not working correctly

Bug #1662784 reported by RaiMan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
RaiMan

Bug Description

reported by https://github.com/Umriyaev
input: https://github.com/RaiMan/SikuliX-2014/issues/210#issuecomment-278236117
tap: https://github.com/RaiMan/SikuliX-2014/issues/210#issuecomment-
278230572
viewport: https://github.com/RaiMan/SikuliX-2014/issues/210#issuecomment-278276189
--------------------------

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:

private static void basicTest(ADBScreen adbs) throws FindFailed {
    log(lvl, "**************** running basic test");
    adbs.aSwipeLeft();
    adbs.aSwipeRight();
    adbs.wait(1f);
    ScreenImage sIMg = adbs.userCapture("Android");
    sIMg.save(RunTime.get().fSikulixStore.getAbsolutePath(), "android");
    Image img = new Image(sIMg);
    adbs.aTap(img);
    adbs.wait(1f);
    sIMg = adbs.userCapture("Android");
    sIMg.save(RunTime.get().fSikulixStore.getAbsolutePath(), "android");
    img = new Image(sIMg);
    adbs.aTap(img);
    adbs.wait(1f);
    adbs.aInput("Hello world");
  }

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.1
RaiMan (raimund-hocke)
description: updated
summary: - [1.1.1] Android - ADB: input not working correctly
+ [1.1.1] Android - ADB: input and tap not working correctly
RaiMan (raimund-hocke)
description: updated
summary: - [1.1.1] Android - ADB: input and tap not working correctly
+ [1.1.1] Android - ADB: input, tap and getDisplayDimension not working
+ correctly
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
importance: High → Undecided
milestone: 1.1.1 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.