JS Testing Academy · QA Demo Site

Registration & Login

Register an account, then log in with it. Password rules, confirm-password, terms checkbox and wrong-credential handling – all in the browser, nothing is stored on a server.

Register

Password strength: -

Login

Password rules: at least 8 characters, one uppercase letter, one digit and one special character. There is also a ready account – qa.tester / Passw0rd!

Practice tasks

  1. Register with a weak password and assert the rules error appears.
  2. Register with mismatching passwords and assert the confirm-password error.
  3. Register without ticking the terms and assert it is blocked.
  4. Register successfully, then log in with the same credentials and assert the welcome text shows the username.
  5. Log in with a wrong password and assert the error message is displayed.
  6. Log out and assert the login form is shown again.
Sample automation code
driver.findElement(By.id("reg-username")).sendKeys("new.tester");
driver.findElement(By.id("reg-email")).sendKeys("new.tester@example.com");
driver.findElement(By.id("reg-password")).sendKeys("Passw0rd!");
driver.findElement(By.id("reg-confirm")).sendKeys("Passw0rd!");
driver.findElement(By.id("reg-terms")).click();
driver.findElement(By.id("reg-submit")).click();
Assert.assertTrue(driver.findElement(By.id("reg-success")).isDisplayed());

driver.findElement(By.id("login-username")).sendKeys("new.tester");
driver.findElement(By.id("login-password")).sendKeys("Passw0rd!");
driver.findElement(By.id("login-submit")).click();
Assert.assertTrue(driver.findElement(By.id("logged-in-user")).getText().contains("new.tester"));