I have a for loop in which I look for attributes that match what I have typed in as a parameter. It passes when it is found but when it isn't found, it keeps looping through. I need a way in which to get the test to fail if it isn't found.
foreach (IWebElement link in links)
{
string text = link.GetAttribute("alt");
if (text == transportMode)
{
Assert.AreEqual(text, transportMode);
}
}
Aucun commentaire:
Enregistrer un commentaire