@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.i(TAG, "onCreate");
    setContentView(io.selendroid.testapp.R.layout.homescreen);
    Button button = (Button) findViewById(io.selendroid.testapp.R.id.buttonTest);
    button.setOnLongClickListener(new OnLongClickListener() {
      @Override
      public boolean onLongClick(View v) {
        showDialog(DIALOG_LONG_PRESS);
        return true;
      }
    });
    initExceptionTestButton();
    initExceptionTestField();
  }
Demo project to verify selendroid actions.

@author ddary
selendroid-test-app/src/main/java/io/selendroid/testapp/HomeScreenActivity.java