@Override
  public void setText(CharSequence... keysToSend) {
    requestFocus();
    final View viewview = getView();
    StringBuilder sb = new StringBuilder();
    for (CharSequence keys : keysToSend) {
      sb.append(keys);
    }
    final String text = getText() + sb;
    instrumentation.getInstrumentation().runOnMainSync(new Runnable() {
      @Override
      public void run() {
        ((EditText) viewview).setText(text);
      }
    });
  }
Unconventional way of adding a Javascript interface but the main reason why I took this way
is that it is working stable compared to the webview.addJavascriptInterface way.
selendroid-server/src/main/java/io/selendroid/server/model/AndroidNativeElement.java