I am not good whatsoever with selenium nor c# however here is the issue I am running into, I have a modal contained in zipModal my issues is I want a for loop to click on the modal until is no longer visible, I have tried a lot of different options and can't seem to figure it out.
if (basePage.IsElementPresent(zipModal))
{
foreach (var modal in zipModal)
{
Thread.Sleep(2000);
if (!basePage.IsElementPresentXPath(cityModal))
{
basePage.Click("[class*='row zip-row highlighted']");
}
else
{
basePage.Click("[class*='row zip-caption']");
basePage.ClickCity(cityModal);
}
}
}