title: Capture the Alert Message text , which is displayed in a TextBox and in editable format
body: <pre><code>try{
  WebDriverWait wait = new WebDriverWait(driver,8(;
  if (wait.until(ExpectedConditions.alertIsPresent())== null)
  {
  Alert alert = driver.switchTo().alert();
  String aamessage = alert.getText();
  if(aamessage.equals("invoked")) /// this text is in input box in Alert pop up, I am able to edit this message in alert pop up.
  {
  alert.accept();
  }
  else
  {
  syso("no alerts");
  }
  }
  catch(unHandledAlertException f)
  {}
  catch(NoAlertPresentException h)
  {}
  
  </code></pre>
  
  <p>To get the text message which is in Input box, i tried this. BUt code not getting that message. Do we have any thing in specific in such cases.</p>
  
  <p>Also in few functionalities, where the alert pop-ups are displayed, I handled it and used  alert.accept(). But still the exception "unhandledalert" is displayed in the console. How to avoid this.</p>