@Override
  protected Dialog onCreateDialog(int id) {
    switch (id) {
      case DIALOG_ALERT:
        // Create out AlterDialog
        Builder builder = new AlertDialog.Builder(this);
        builder.setMessage("This will end the activity");
        builder.setCancelable(true);
        builder.setPositiveButton("I agree", new OkOnClickListener());
        builder.setNegativeButton("No, no", new CancelOnClickListener());
        AlertDialog dialog = builder.create();
        dialog.show();
        return dialog;
      case DIALOG_LONG_PRESS:
        Builder builder2 = new AlertDialog.Builder(this);
        builder2.setMessage("Long Press Tap has been received.");
        builder2.setCancelable(true);
        builder2.setPositiveButton("Ok", new CancelOnClickListener());
        AlertDialog dialog2 = builder2.create();
        dialog2.show();
        return dialog2;
      case DIALOG_DOWNLOAD_PROGRESS:
        progressDialog = new ProgressDialog(this);
        progressDialog.setMessage("Waiting Dialog");
        progressDialog.setIndeterminate(false);
        progressDialog.setMax(100);
        progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        progressDialog.setCancelable(true);
        progressDialog.show();
        return progressDialog;
    }
    return super.onCreateDialog(id);
  }
Demo project to verify selendroid actions.

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