title: How to perform click event on an element present in the anchor tag?
body: <pre><code>&lt;div class="buttonClear_bottomRight"&gt;
      &lt;div class="buttonBlueOnWhite"&gt;
          &lt;a onclick="$find('{0}').close(true); callPostBackFromAlert();" href="#"&gt;Ok&lt;/a&gt;&lt;div
              class='rightImg'&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the above code i wanted to click on Ok button present in the anchor tag.But an id is not generated because of which i cannot directly perform a click action. I tried a work around mentioned below.</p>
  
  <pre><code>IElementContainer elm_container = (IElementContainer)pw.Element(Find.ByClass(classname));
  foreach (Element element in elm_container.Elements)
  {
    if (element.TagName.ToString().ToUpper() == "A")
    {
      element.Click();
    }
  }
  </code></pre>
  
  <p>But here <code>elm_container</code> returns null for intial instances due to which we cannot traverse through it. Is there any other easy method to do it ?</p>