static private NotNull ( object o, string message ) : void | ||
o | object | |
message | string | |
return | void |
internal FormVariables VariablesFor(string formHtmlId) { if (formVariables == null) { ParsePageText(); } FormVariables result = (FormVariables)formVariables[formHtmlId]; WebAssert.NotNull(result, "form ID '" + formHtmlId + "' not found on current page"); return(result); }
private HtmlTagTester FindTagByForm() { XmlNodeList formNodes = browser.CurrentPage.Document.GetElementsByTagName("form"); WebAssert.True(formNodes.Count == 1, "The current page has more than one form. To test it, construct a WebFormTester and use it as the 'container' parameter for your other testers."); XmlElement formElement = (XmlElement)formNodes[0]; XmlAttribute id = formElement.Attributes["id"]; WebAssert.NotNull(id, "couldn't find web form's 'id' attribute"); return(new HtmlTagTester(id.Value)); }