Tuesday, November 6, 2018

Selenium Webdriver FB login page Scripts

package package1;

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

public class Tutorials {

public static void main(String[] args){
WebDriver driver=new FirefoxDriver();
driver.get("http://www.facebook.com");
driver.findElement(By.id("email")).sendKeys("yourUsername");
driver.findElement(By.id("pass")).sendKeys("yourPassword");
driver.findElement(By.id("u_0_n")).click();

}

}

No comments:

Post a Comment