title: Webdriver - How can I Assert an attribute exists
body: <p>I'm trying to assert that a particular "ID" contains an attribute of "hidden".  The "hidden" attribute will never actually have a value.  It will exist if I have clicked on a particular button and it will not exist if I haven't clicked on a particular button.  Here is the code:   </p>
  
  <pre><code>&lt;div id="Callback-time" hidden=""&gt;
  </code></pre>
  
  <p>I have tried to get a handle on the attribute as follows but I'm not getting anything:</p>
  
  <pre><code>IwebElement CallBackTime = driver.FindElement(By.Id("Callback-time");
  String Value = CallBackTime.GetAttribute("hidden");
  System.Diagnostics.Debug.WriteLine(Value);
  </code></pre>