2017-07-06 7 views

答えて

0

希望は、これはあなたがFacebookのを開いて、ログインしようとしているyou.Hereのに役立ちます。

import org.openqa.selenium.*; 
import org.openqa.selenium.firefox.FirefoxDriver; 
import java.util.List; 

public class TestCase { 
    private static WebElement element; 
    static WebDriver driver; 
    public static void main(String[] args) throws InterruptedException { 
     String URL = "https://www.facebook.com/"; 
     driver = new FirefoxDriver(); 
     driver.get(URL); 
     driver.findElement(By.id("email")).sendKeys("username"); 
     driver.findElement(By.id("pass")).sendKeys("password"); 
     driver.findElement(By.id("pass")).sendKeys(Keys.ENTER); 
    } 
} 
+0

ありがとうございました!それは働いている! – Kenz

関連する問題