Code example for Instrumentation

Methods: sendStringSync

0
    if (!(view instanceof EditText)) {
      Log.e("spade", "type: expected TextArea or TextField for first argument");
      return false; 
    } 
 
    mInst.sendStringSync(text);
    return true; 
  } 
 
  @Kroll.method 
  public void tapText(String text) {
    mSolo.clickOnText(text);
  } 
 
  private void dictToPoint(KrollDict point, int[] pointOut) throws IllegalArgumentException {
    if (!point.containsKey("x")) {
      throw new IllegalArgumentException("spade: required property \"x\" not found in point");
    } 
    if (!point.containsKey("y")) {
      throw new IllegalArgumentException("spade: required property \"y\" not found in point");
    }