0

I'm running a program for Login using selenium WebDriver and getting an error. What could be the reason?

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)

Edit: OP says this code was working before:

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();
    }
}
Andrew Regan
  • 5,087
  • 6
  • 37
  • 73
Chetna Mishra
  • 59
  • 2
  • 4
  • probably u r getting this error at when you use sendkeys .also please show us your code – Rajnish Kumar Apr 06 '16 at 12:30
  • can you please share the code you are using. It will help us to help you better – Shubham Jain Apr 06 '16 at 12:31
  • given code, it was working earlier: `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(); } }` – Chetna Mishra Apr 07 '16 at 04:36
  • This looks like a WebDriver / Firefox bug (at https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/http/JsonHttpCommandCodec.java#L221). What Selenium and Firefox versions are you running? Also, have you tried in any other browser? – Andrew Regan Apr 07 '16 at 21:33
  • FF#45.0.1, SW#2.53.0 (Mars) – Chetna Mishra Apr 08 '16 at 06:11
  • FF#45.0.1, SW#2.53.0 (Mars), JDK 8(66 update) – Chetna Mishra Apr 08 '16 at 07:05
  • Thanks. Is there a public URL for recreating this? – Andrew Regan Apr 08 '16 at 17:12
  • Its working on G chrome#49. Also the same code working on other machine. Seems setup issue, I did the resetup again, but still not working. – Chetna Mishra Apr 12 '16 at 07:19
  • I can't help without the real URL or a way of recreating this. Even if you raised a bug @ SeleniumHQ you'd still need to do that. – Andrew Regan Apr 12 '16 at 11:14

0 Answers0