title: test cases for login page using selenium ; java and Eclipse IDE
body: <p>I am new to selenium webdriver, java (junit) and eclipse IDE.</p>
  
  <p>Please help me to provide all the test cases for the login page. </p>
  
  <p>I have managed to write one test case in the test suite in eclipse IDE using selenium and Junit.</p>
  
  <p>for your reference the two classes are:</p>
  
  <pre><code>import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;  
  import junit.textui.TestRunner;
  
  public class TestSuite1 extends TestCase {    
      public static Test suite() {  
          TestSuite suite = new TestSuite();  
  
          suite.addTestSuite(TestCase1.class);
          //suite.addTestSuite((Case1) Testcase1.newInstance());  
          //suite.addTestSuite(TestCase1.newInstance());             
          return suite;  
      }  
  
      public static void main(String arg[]) {
          TestRunner.run(suite());
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.openqa.selenium.WebElement;
  
  import com.thoughtworks.selenium.SeleneseTestCase;
  
  public class TestCase1 extends SeleneseTestCase {
      public void setUp() throws Exception {  
          login();
      }
  
      public void login() {
          WebDriver driver = new FirefoxDriver();
          driver.get("http://");
          WebElement id = driver.findElement(By.name("username"));
          WebElement pass = driver.findElement(By.name("password"));
          WebElement button = driver.findElement(By.xpath("/html/body/div/div/div[2]/div/form/p[3]/input"));         
  
          id.sendKeys("tuser991@yahoo.co.in");
          pass.sendKeys("abc123");
          button.submit();
      }
  }
  </code></pre>