Using c# and selenium webdriver, how can I wait until the last class in a list contains a specific attribute?
In my AUT, I have three classes on a page (they are all called paragraph). I need to get the last paragraph specifically (I'm using a list but feel free to suggest better method) then wait until the last class on the page contains an outerHTML attribute of "X".
This is what I have so far:
I create a list to store all classes, get the last class and finally, get the outerHTML attribute for the last class.
IList<IwebElement> Element = driver.FindElements(By.ClassName("Paragraph"));
var GetLastElement = Element.Last();
var LastElementAttribute = GetLastElement.GetAttribute("outerHTML");
Based on my code above, how can I add a wait condition that will check the last class in the list contains an outerHTML attribute of "X"?