Find an element with Selenium Webdriver which fulfils multiple By-criteria
<p>I am using v2.52 of Selenium and the WebDriver with C#. What I am trying to achieve should be fairly simple, but I am unable to find the solution for: I'd like to find an element by multiple <code>By</code>-criteria.</p>

<p>Let's say, I have something like this:
</p>

<pre><code>&lt;a href="#" class="foo"&gt;Click me!&lt;/a&gt;
&lt;a href="#" class="bar"&gt;Click me!&lt;/a&gt;
&lt;p class="foo"&gt;Click me!&lt;/p&gt;
</code></pre>

<p>Ignore the fact, that I could use <code>By.CssSelector</code>, <code>By.CssSelector</code>, <code>By.XPath</code> and so on. I was assuming that it should be possible to do something like this:
</p>

<pre><code>driver.FindElement(By.TagName("a").ClassName("foo"))
// ...or something like this...
driver.FindElement(By.TagName("a"), By.ClassName("foo"))
</code></pre>

<p><code>OpenQA.Selenium.Support.PageObjects.ByChained</code> does not do the trick, since it is searching hierarchical.</p>

<p>Is there a way to find element(s) which match multiple <code>By</code>-criteria?</p>

<p>Best regards,
   Carsten</p>