我在Chrome上试过但没有使用Firefox。
package SeleniumCase;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class SeleniumClass {
public static void main(String[] args)
{
WebDriver driver;
System.setProperty("webdriver.gecko.driver","E:\\Librar\\geckodriver.exe");
driver = new FirefoxDriver();
driver.get("my company url hide for security reason");
driver.findElement(By.id("UserName")).sendKeys("admin@school.com");
driver.findElement(By.id("next")).click();
driver.findElement(By.id("Password")).sendKeys("passw0rd");
driver.findElement(By.id("submit")).click();
}
}
答案 0 :(得分:0)
您收到任何错误吗?请分享异常或错误
试试这个
'10.'