title: Print out users choice after input ... JavascriptExecutor
body: <p>How do i store user input and print it out using JavascriptExecutor? ... Below is what i have tried so far. The prompt box works fine and takes user input. but i need to get what the user input and store it in String, so that i can use it in my code.</p>
  
  <pre><code>JavascriptExecutor javascript = (JavascriptExecutor) driver;
      String ans = (String) javascript.executeScript("prompt('How do you want to SIGN UP?\\n\\n (1) FACEBOOK\\n (2) GOOGLE\\n (3) LOCALLY');");
  //Object ans = javascript.executeScript("prompt('How do you want to SIGN UP?\\n\\n (1) FACEBOOK\\n (2) GOOGLE\\n (3) LOCALLY');");
      Thread.sleep(10000);
      //String answer = (String) ans;
      System.out.println(ans);
  </code></pre>