我正在尝试编写一个将登录到 facebook 的测试脚本,但它没有单击登录按钮。我在这里哪里做错了?
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
public class GoogleRobotSearch {
private Selenium sel;
public GoogleRobotSearch () {
sel = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.com");
sel.start();
}
public void search() {
sel.open("http://www.facebook.com");
sel.type("id=email","email");
sel.type("id=pass","password");
//sel.waitForPageToLoad("5000");
sel.click("//input[@value='Log In']");
}
public static void main (String args[]) {
GoogleRobotSearch xybot = new GoogleRobotSearch ();
xybot.search();
}
}