private void registerUser(UserDO user) throws Exception {
    WebElement button = driver().findElement(By.id("startUserRegistration"));
    
    button.click();

    WebElement username = driver().findElement(By.id("inputUsername"));

    username.sendKeys(user.getUsername());
    WebElement nameInput = driver().findElement(By.id("inputName"));
    Assert.assertEquals(nameInput.getText(), "Mr. Burns");
    nameInput.clear();
    nameInput.sendKeys(user.getName());

    driver().findElement(By.id("inputEmail")).sendKeys(user.getEmail());
    driver().findElement(By.id("inputPassword")).sendKeys(user.getPassword());
    try {
      nameInput.submit();
      Assert.fail("submit is not supported by SelendroidNativeDriver");
    } catch (WebDriverException e) {
      // expected behavior
    }

    driver().findElement(By.id("input_preferedProgrammingLanguage")).click();
    driver().findElement(By.linkText(user.getProgrammingLanguage().getValue())).click();
    WebElement acceptAddsCheckbox = driver().findElement(By.id("input_adds"));
    Assert.assertEquals(acceptAddsCheckbox.isSelected(), false);
    acceptAddsCheckbox.click();
    
    Assert.assertEquals(driver().getCurrentUrl(), "and-activity://RegisterUserActivity");
    try {
      driver().getTitle();
      Assert.fail("Get title is not supported by SelendroidNativeDriver");
    } catch (WebDriverException e) {
      // expected behavior
    }

    driver().findElement(By.id("btnRegisterUser")).click();
  }
Base Test to demonstrate how to test native android apps with Selendroid.

@author ddary
selendroid-test-app/src/test/java/io/selendroid/tests/UserRegistrationTest.java