我正在使用selenium WebDriver运行一个Login程序并收到错误。可能是什么原因?
Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: GIF89a
Command duration or timeout: 156 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'VRDT32', ip: '172.18.1.152', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_74'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at LoginPage.main(LoginPage.java:11)
编辑: OP说这段代码之前正在运作:
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
public class LoginPage {
public static void main(String[] args) { // TODO Auto-generated method stub
FirefoxDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://180.211.114.147:97/Account/Login");
driver.findElement(By.xpath("//*[@id='UserName']")).sendKeys("Chetna123");
driver.findElement(By.xpath("//*[@id='Password']")).sendKeys("Chetna123");
driver.findElement(By.xpath("//*[@id='btnLogin']")).click();
}
}