Selenium C#, IList<IWebElement> Iterate through and Assert Values
<p>Any help would be appreciated.</p>

<p>Firstly, I'm using pageObject, and I have the following element.</p>

<pre><code>[FindsBy(How = How.Xpath, Using = ".//*[@id='control-content']/div/tbody/th")]    
public IList&lt;IWebElement&gt; TableHeaders { get; set; }
</code></pre>

<p>In this Ilist it should collect all values within the main column header.</p>

<p>I instantiate the class in the relevant page for script.</p>

<pre><code>pageModule pm = new PageModule();
</code></pre>

<p>In the relevant page. I call the element.</p>

<pre><code>var values = pm.TableHeaders;
</code></pre>

<p>Then I I set a list</p>

<pre><code>List&lt;String&gt; nameFilters = new List&lt;String&gt;(){
"Name",
"Name2",
}

foreach(var value in Values){
  Console.WriteLine("The value is : ") + values);
}
</code></pre>

<p>This is for the outputting the text in the ilist, I want to check the values match the Ilist and The string list.</p>

<p>I want to iterate through the list of these and check that list contains these values, I know you can use LINQ to make this query simple, I just can't think of an easy idea at the moment.</p>

<p>Thanks</p>