I finished the 2nd video on webdriver today where you explained about webdrivers. I have a setup which works just fine. The methods below displays that method testesmqa1() succeeds because the keys are correct, however, the method testesmqa2() should fail because of the wrong keys.
When i execute the test, the results shows all 6 tests passed (6 because i am invoking Chrome and IE webdrivers also).
Is this the right way to perform this test?
public class rlTestNG extends SelTestCase {
public void testesmqa1(){
driver.get("
http://esmqa1ui.realads.com/oas/login.do;jsessionid=8261B4BF5962C7CF18E141B2AF2107D4");
driver.findElement(By.name("loginId")).sendKeys("Raj");
driver.findElement(By.name("password")).sendKeys("#6Raj");
driver.findElement(By.name("accountId")).sendKeys("Raj");
driver.findElement(By.id("loginButton")).click();
}
public void testesmqa2(){
driver.get("
http://esmqa1ui.realads.com/oas/login.do;jsessionid=8261B4BF5962C7CF18E141B2AF2107D4");
driver.findElement(By.name("loginId")).sendKeys("Raj123");
driver.findElement(By.name("password")).sendKeys("#6Raj");
driver.findElement(By.name("accountId")).sendKeys("Raj");
driver.findElement(By.id("loginButton")).click();
}
}