I want to create a method in my selenium test, which does wait until an element with a specific string inside the InnerHTML is displayed.
Currently I have this here:
string textToCompare = "Hello";
w.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementExists(By.XPath(PathElement))).GetAttribute("innerHTML");
In the codeline above, im just waiting for PathElement and get the attribute of the innerHTML.
But i want this to behave like: Wait for the element which has the textToCompare string inside of its innerHTML
If there are other waiting methods for selenium, i would be open for any suggestions.
Or is there a way to navigate with the PathElement variable directly to the InnerHTML?
