Test1 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package com.wipro.mbs.bsm; import com.thoughtworks.selenium.*; import org.testng.annotations.*; import static org.testng.Assert.*; import java.util.regex.Pattern; public class Test1 extends TestSetUp { @Test public void test1() throws Exception { selenium.open("/bsm/Login.action"); verifyTrue(selenium.isTextPresent("LOGIN")); verifyTrue(selenium.isTextPresent("Username:")); verifyTrue(selenium.isElementPresent("username")); verifyEquals(selenium.getValue("username"), ""); verifyTrue(selenium.isTextPresent("Password:")); verifyTrue(selenium.isElementPresent("password")); verifyEquals(selenium.getValue("password"), ""); selenium.type("username", "ipdc"); selenium.type("password", "wm18.5%pty!"); selenium.click("login"); selenium.waitForPageToLoad("30000"); verifyTrue(selenium.isTextPresent("User accounts")); verifyTrue(selenium.isElementPresent("link=My account")); verifyTrue(selenium.isElementPresent("link=Manage accounts"));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: verifyTrue(selenium.isTextPresent("Username")); verifyTrue(selenium.isTextPresent("ipdc")); verifyTrue(selenium.isElementPresent("link=Change password. ..")); verifyTrue(selenium.isTextPresent("First name")); verifyEquals(selenium.getValue("currentAccount.firstname"), ""); verifyTrue(selenium.isTextPresent("Last name")); verifyEquals(selenium.getValue("currentAccount.lastname"), "Default super user"); verifyTrue(selenium.isTextPresent("Creation date")); verifyTrue(selenium.isTextPresent("Expiration date")); verifyTrue(selenium.isTextPresent("User roles")); verifyTrue(selenium.isTextPresent("dco superusr")); verifyTrue(selenium.isTextPresent("exact:User: ipdc")); verifyTrue(selenium.isElementPresent("link=Help")); selenium.click("logoutBtn"); selenium.waitForPageToLoad("30000"); } }...
View Full Document

Ask a homework question - tutors are online