The click() method is used to simulate the clicking of any element. 
It does not take any parameter/argument.
//Here is the code
package test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class FacebookLogin {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://facebook.com");
//Enter the text into emailaddress
driver.findElement(By.xpath("//*[@id='Email']")).sendKeys("ritu7180@gmail.com");
//Enter the text into password Filled
driver.findElement(By.xpath("//*[@id='Passwd']")).sendKeys("password");
//Clicking on signInButton
driver.findElement(By.xpath("//*[@id='signIn']")).click();
}
}




0 comments:
Post a Comment