I have id's like follows:
id='vat-code-A'
id='vat-code-B'
id='vat-code-c'
id='vat-code-D'
I want to check if the above element(s) count>0, which can be done using a for each loop. But, is there a way to perform the above requirement with Linq as below.
var codes = new List<string>() { "A", "B", "C", "D" };
var vatElement = Driver.FindElements(By.Id($'vat-code-{codes .Select(x=>x)}"));
if (((vatCodeElement.Count()) > 0) == true)
{
return true;
}
By.Id("id='vat-code-System.Linq.Enumerable+WhereSelectListIterator``2[System.String,System.String]")doesn't make much sens