When I use HtmlElementContainer.Get<HtmlDiv>(...), it will throw exception if it can't find element in the page for a specified period. Is there any setting to return null if the control is not found? I don't want to catch exception every time I find an element.
Example: this is what I want to do
HtmlDiv divUserName = HtmlElementContainer.Get<HtmlDiv>(new HtmlFindExpression(...), true, 5000);
Assert.IsNotNull(divUserName , "Cannot find username control");
Example: this is what I want to do
HtmlDiv divUserName = HtmlElementContainer.Get<HtmlDiv>(new HtmlFindExpression(...), true, 5000);
Assert.IsNotNull(divUserName , "Cannot find username control");