@Test public void shouldNotifyUserWhenEmailAddressesAreDifferent() { driver.get(URL); String title = driver.getTitle(); assertEquals("Rule Financial Registration Form", title); int randomIntNUmberForRegistration = this.generator.nextInt(100000); driver.findElement(By.name("firstName")).clear(); driver.findElement(By.name("firstName")).sendKeys("Marcin"); driver.findElement(By.name("lastName")).clear(); driver.findElement(By.name("lastName")).sendKeys("Kowalczyk"); String email = new String("marcinkowalczyk" + randomIntNUmberForRegistration + "@gmail.com"); driver.findElement(By.name("email")).clear(); driver.findElement(By.name("email")).sendKeys(email); driver.findElement(By.name("repeatEmail")).clear(); driver.findElement(By.name("repeatEmail")).sendKeys("wrong" + email); WebElement divErrorEmailAdress = driver.findElement(By.xpath("html/body/div[2]/div[2]/div/div/div/div[5]/div/div")); boolean ariaHidden = Boolean.getBoolean(divErrorEmailAdress.getAttribute("aria-hidden")); assertEquals(ariaHidden, false); }
private EnvironmentConfig makeBasicConfig() { EnvironmentConfig ec = new EnvironmentConfig(); ec.setAllowCreate(true); ec.setInitializeCache(true); ec.setInitializeLocking(true); ec.setInitializeLogging(true); ec.setInitializeReplication(true); ec.setTransactional(true); ec.setReplicationManagerAckPolicy(ReplicationManagerAckPolicy.ALL); ec.setRunRecovery(true); ec.setThreaded(true); if (Boolean.getBoolean("VERB_REPLICATION")) ec.setVerbose(VerboseConfig.REPLICATION, true); return (ec); }
public void testMain() throws Exception { Logger.global.addHandler(new BlockingHandler()); Parallel.main(null); if (Boolean.getBoolean("no.failures")) return; fail("Ok, just print the logged output"); }