title: Selenium Script fails on Firefox Browser
body: <p>I'm Using -</p>
  
  <blockquote>
    <p>Selenium 3.0.1 with java</p>
    
    <p>Firefox version : 50.1.0</p>
    
    <p>geckodriver-v0.13.0-win64</p>
  </blockquote>
  
  <p>I have created one complete testsuit of my web application. When I run it on <code>chrome</code> browser, all test runs smoothly. no issue at all but for browser compatibility test, I switched to <code>firefox</code> driver and run the test, My test getting always failed . Problem happening with input fields, I guess the speed of entering text is too fast due to this, even the text not getting filled in text boxes but it is clicking the submit button as I'm able to see blank field validation messages.I'm sucked how to deal with this. Do I need to debug&amp;run my whole script on FF or is there any feasible solution ? </p>
  
  <p><strong>Eidted</strong></p>
  
  <p>I have one <code>DriverSetup</code> class where following code is placed -</p>
  
  <pre><code>public class DriverSetup 
  {
      public static WebDriver driver;
      @BeforeTest
      @Parameters("browser")
      public void setUp( @Optional String browser) throws IOException
      {
          try
          {
              switch(browser)
              {
                      case "chrome":
  
                          System.out.println("Starting chrome........");
                          System.setProperty("webdriver.chrome.driver","D:/Application/ChromeDriver/chromedriver.exe");
                          driver = new ChromeDriver();        
                          driver.manage().window().maximize();
                          driver.get(TestData.mainSiteURL);
                          driver.manage().timeouts().implicitlyWait(45, TimeUnit.SECONDS);
                          ScreenCapture.passedScreenShot();
                      break;
  
                      case "firefox":
                          System.out.println("Starting Firefox........");
                          System.setProperty("webdriver.gecko.driver","D:/Application/geckodriver.exe");
                          driver = new FirefoxDriver();       
                          driver.manage().window().maximize();
                          driver.get(TestData.mainSiteURL);                   
                          driver.manage().timeouts().implicitlyWait(45, TimeUnit.SECONDS);
                          ScreenCapture.passedScreenShot();
                      break;
                  }
          }
          catch(Exception e)
          {
              System.out.println("Exception In : "+Thread.currentThread().getStackTrace()[1].getClassName()+"--&gt;"+Thread.currentThread().getStackTrace()[1].getMethodName());
              ScreenCapture.failedScreenShot();
          }
      }
  }
  </code></pre>
  
  <p>And Another is <code>SubmitNewContact</code> class</p>
  
  <pre><code>public class SubmitNewContact extends DriverSetup
  {
  
      @Test
      public void submitNewContact() throws IOException
      {
  
          try
          {
              driver.findElement(By.linkText("Contact")).click();
              driver.findElement(By.id("Name")).sendKeys(TestData.contactName);
              driver.findElement(By.id("Phone")).sendKeys(TestData.contactPhone);
              driver.findElement(By.id("EmailID")).sendKeys(TestData.contactEmail);
              driver.findElement(By.id("message")).sendKeys(TestData.contactMessage);
              ScreenCapture.passedScreenShot();
              driver.findElement(By.xpath("//button[@type='submit']")).click();   
              ScreenCapture.passedScreenShot();
              Thread.sleep(3000);
          }
  
          catch(Exception e)
          {
  
              System.out.println("Exception In : "+Thread.currentThread().getStackTrace()[1].getClassName()+"--&gt;"+Thread.currentThread().getStackTrace()[1].getMethodName());
              ScreenCapture.failedScreenShot();
          }
  
      }
  }
  </code></pre>
  
  <p>And Running both classes using testNG -</p>
  
  <pre><code>  &lt;test name="ExecuteTestFirefox"&gt;
      &lt;parameter name="browser" value="firefox" /&gt;
           &lt;classes&gt;                  
                      &lt;class name="com.testmaster.DriverSetup"/&gt;
                      &lt;class name="com.test.user.SubmitNewContact"/&gt;
           &lt;/classes&gt; 
    &lt;/test&gt;
  </code></pre>
  
  <p><strong>Note</strong> :- Also having some other classes like <code>SubmitNewContact</code> for each functionality of my application and running then all using <code>testing.xml</code></p>