Exemplo n.º 1
0
 public static void WaitForElementWithGivenAttributeValue(this IWebDriver driver, IHtmlControl element, string attributeName, string attributeValue)
 {
     try
     {
         driver.WaitUntil(d => element.GetAttribute(attributeName) == attributeValue);
     }
     catch (WebDriverTimeoutException)
     {
         string msg = $"Waiting for element attribute value failed. Waited for value: '{attributeValue}' in attribute: '{attributeName}'. ";
         throw new WebDriverTimeoutException(msg);
     }
 }