/// <summary> /// Will determine if an element's text matches or it's 'value' attribute matches. /// </summary> /// <param name="element"></param> /// <param name="elementText"></param> /// <returns></returns> private bool ElementTextOrValueMatches(IWebElement element, string elementText) { WebElementWrapper wrapper = new WebElementWrapper(element); if (wrapper.TextMatches(elementText)) { return true; } if (wrapper.ValueAttributeMatches(elementText)) { return true; } return false; }