Login to http://www.makemytrip.com/

Note- Here we need to take care while writing the xpath for password field because that has some hidden html code.


import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class SuccessLogin{
public static void main(String[] args){

WebDriver driver =new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("http://www.makemytrip.com");
driver.findElement(By.id("login_dropOpenItem")).click();
driver.findElement(By.id("username")).sendKeys("rishi.vg1@gmail.com");
driver.findElement(By.xpath("//input[@id='password_text']")).sendKeys("somepassword");
driver.findElement(By.id("login_btn")).click();
}
}