I am executing Selenium/TestNG script for Gmail Login in WindowsXP/IE8. Script enters userid and password correct in that page, but it is not clicking on 'Signin'option in Gmail.
I ran same script in Windows7/IE9, it worked. Same script is also working for Firefox. Please Advise.
Selenium Version: 2.25.0
import org.testng.annotations.*;
import org.openqa.selenium.*;
import org.openqa.selenium.ie.*;
public class New_Booking_Inc {
private WebDriver driver;
private String baseUrl;
@BeforeTest
public void Open_IE() throws Exception {
System.setProperty("webdriver.ie.driver", "C:\\WINDOWS\\system32");
driver = new InternetExplorerDriver();
baseUrl = "http://www.gmail.com";
driver.get(baseUrl);
}
@Test (testName = "Login")
public void Login() throws Exception {
//driver.get(baseUrl);
driver.findElement(By.id("Email")).clear();
driver.findElement(By.id("Email")).sendKeys("extsc2");
Thread.sleep(1000);
driver.findElement(By.id("Passwd")).clear();
driver.findElement(By.id("Passwd")).sendKeys("Passwords");
Thread.sleep(1000);
driver.findElement(By.id("signIn")).click();
Thread.sleep(5000);
}
@AfterTest
public void Close_IE() throws Exception {
driver.quit();
}
}