Friday, May 25, 2012

Selenium RC, Junit4 for logging into linkedin.com website

Selenium RC and Junit4 for logging into linkedin.com website package tests; import com.thoughtworks.selenium.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.regex.Pattern; public class ExcelData extends SeleneseTestCase { @Before public void setUp() throws Exception { selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.linkedin.com/"); } @Test public void testUntitled() throws Exception { selenium.start(); selenium.open("/"); selenium.type("id=session_key-login", "shinde.of.santosh@gmail.com"); selenium.type("id=session_password-login", "02d91a0433"); selenium.click("id=btn-login"); //selenium.click("id=btn-login"); selenium.isElementPresent("Home"); selenium.waitForPageToLoad("30000"); } @After public void tearDown() throws Exception { selenium.stop(); } }

1 comment:

  1. Very informative, keep posting such smart articles, it extraordinarily helps to understand relating to things.

    ReplyDelete