title: How to handle a web element getting removed from DOM using Selenium Webdriver?
body: <p>I'm trying to get the value of label that has the xpath as xpath=".//*[@id='msgIdmmrka']" on Sign In page of <a href="http://www.overstock.com" rel="nofollow">http://www.overstock.com</a>. But this web element is removed from the DOM after few seconds when I enter no email, valid password and click the Sign In button.</p>
  
  <p>I'm new to Selenium Webdriver, so could not think of a solution on how to handle this scenario? Could you please help me with this?</p>
  
  <p>I get the below exception error message when trying to find this web element</p>
  
  <pre><code>Unable to locate element: {"method":"xpath","selector":".//*[@id='msgIdmmrka']"}
  Command duration or timeout: 30.19 seconds
  For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
  Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
  System info: host: 'Srinivasans-MacBook-Pro.local', ip: '192.168.0.101', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_101'
  Driver info: org.openqa.selenium.firefox.FirefoxDriver
  Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.3, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
  Session ID: 724463ca-6ab8-f246-acb4-6c8d955e066c
  *** Element info: {Using=xpath, value=.//*[@id='msgIdmmrka']}
  </code></pre>