title: Selenium Webdriver [Java] [gecko] : How do I pass a string to a input field in an Alert
body: <p>I have an online Web Application where there is a product listed which have a View button. On clicking the View button an alert is shown. The Alert have four (4) fields as: Alert Text, An Input Text field, OK button &amp; Cancel button. The Alert text reads as "The Alert Text is :Product is out of Stock ! Please enter your Email Id".</p>
  
  <p>If I Cancel the alert with my Selenium Java code, it works well:</p>
  
  <pre><code>//Switch to the Alert &amp; Dismiss
  driver.switchTo().alert().dismiss();
  </code></pre>
  
  <p>If I simply click OK with my Selenium Java code, it does works well:</p>
  
  <pre><code>//Click on Accept
  driver.switchTo().alert().accept();
  </code></pre>
  
  <p>But if I try to provide my email id in the Input Text field on the Alert,</p>
  
  <pre><code>Thread.sleep(3000);
  driver.switchTo().alert().sendKeys("debanjan.selenium@mymail.com");
  //driver.switchTo().alert().sendKeys("debanjan");
  
  //Click on Accept
  driver.switchTo().alert().accept();
  </code></pre>
  
  <p>Selenium is showing org.openqa.selenium.WebDriverException as follows:</p>
  
  <blockquote>
    <p>The Alert Text is :Product is out of Stock ! Please enter your Email
    Id org.openqa.selenium.WebDriverException: Missing 'value' parameter
    (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 6 milliseconds</p>
  </blockquote>
  
  <p>OS Details: 'Windows 8' pro, os.arch: 'amd64', os.version: '6.2',</p>
  
  <p>Java.version: '1.8.0_77'</p>
  
  <p>Driver info: org.openqa.selenium.firefox.FirefoxDriver</p>
  
  <p>Can anyone help me out please?</p>
  
  <p>The weird thing is that:
  When I try through standalone Selenium Java Class to  handle the Alert (i.e. passing the emailID in the Alert Text Box) this piece of code works fine.</p>
  
  <pre><code>driver.switchTo().alert().sendKeys("debanjan.selenium@gmail.com");
  </code></pre>
  
  <p>But when the same code is implemented through a FRAMEWORK (which I implemented) [Class : PlaceOrder, Method : orderCamera()], the emailID is never written in the Textbox field of the Alert.</p>