Property | Type | Description | |
---|---|---|---|
ChildrenByXPath | NUnit.Extensions.Asp.HtmlTagTester[] | ||
HtmlTagTester | System | ||
HtmlTagTester | System |
Method | Description | |
---|---|---|
Attribute ( string name ) : string |
Returns the value of an attribute on this tag or throws an exception if the attribute isn't present.
|
|
AttributeAsIntWithNegOneDefault ( string name ) : int |
Returns an attribute as an integer, or -1 if the attribute isn't present. Throws an exception if the attribute isn't an integer.
|
|
Child ( string tag ) : HtmlTagTester |
Returns the only child (of a particular type) of this tag. If this tag has more that one child of the requested type, or if it has no children of the requested type, this method will throw an exception. Don't cache the results of this call.
|
|
Children ( string tag ) : NUnit.Extensions.Asp.HtmlTagTester[] |
Returns the immediate children of this tag that match a particular type (such as <tr>). Does not return "grand-children" -- i.e., calling Don't cache the results of this call.
|
|
ChildrenByXPath ( string xpath ) : NUnit.Extensions.Asp.HtmlTagTester[] |
Returns the tags that match an XPath expression, starting from this tag (node). Make sure that the result of your expression is a set of tags. Don't cache the results of this call.
|
|
HasAttribute ( string name ) : bool |
Returns true if this tag has the specified attribute.
|
|
HasChildren ( string tag ) : bool |
Returns 'true' if this tag has any immediate children that match a particular type (such as <tr>. Does not check "grand-children" -- i.e., calling
|
|
HtmlTagTester ( string htmlId ) : System |
Create a tester for an HTML tag. Use this constructor for testing most tags.
|
|
HtmlTagTester ( string aspId, Tester container ) : System |
Create a tester for a server-side HTML control or a tag that's on a page with multiple forms. Use this constructor when the HTML tag you are testing has the "runat='server'" attribute. Also use this tester when using the non-default webform or HttpClient.
|
|
HtmlTagTester ( string xpath, string description ) : System |
Create a tester for an HTML tag using an XPath description.
|
|
HtmlTagTester ( string xpath, string description, Tester container ) : System |
Create a tester for an HTML tag that's on a page with multiple forms using an XPath description.
|
|
OptionalAttribute ( string name ) : string |
Returns the value of an attribute on this tag or null if the attribute isn't present.
|
|
TestInstance ( string htmlPage, string xpath ) : HtmlTagTester |
For NUnitAsp's test suite only.
|
|
TestInstance ( string htmlPage, string id, string description ) : HtmlTagTester |
For NUnitAsp's test suite only.
|
Method | Description | |
---|---|---|
ChildrenByXPath ( string xpath, string description ) : NUnit.Extensions.Asp.HtmlTagTester[] | ||
HtmlTagTester ( ) : System | ||
HtmlTagTester ( |
A static HTML tag constructed for temporary use. It will not reflect the page currently loaded by the browser and shouldn't be cached.
|
public Attribute ( string name ) : string | ||
name | string | The name of the attribute. |
return | string |
public AttributeAsIntWithNegOneDefault ( string name ) : int | ||
name | string | |
return | int |
public Child ( string tag ) : HtmlTagTester | ||
tag | string | The type of tag to look for. Don't include angle brackets. |
return | HtmlTagTester |
public Children ( string tag ) : NUnit.Extensions.Asp.HtmlTagTester[] | ||
tag | string | The type of tag to return. Don't include angle brackets. |
return | NUnit.Extensions.Asp.HtmlTagTester[] |
public ChildrenByXPath ( string xpath ) : NUnit.Extensions.Asp.HtmlTagTester[] | ||
xpath | string | The XPath expression to match. |
return | NUnit.Extensions.Asp.HtmlTagTester[] |
public HasAttribute ( string name ) : bool | ||
name | string | The name of the attribute. |
return | bool |
public HasChildren ( string tag ) : bool | ||
tag | string | The type of tag to look for. Don't include angle brackets. |
return | bool |
public HtmlTagTester ( string htmlId ) : System | ||
htmlId | string | The ID of the control to test (look in the /// page's ASP.NET source code for the ID). |
return | System |
public HtmlTagTester ( string aspId, Tester container ) : System | ||
aspId | string | The ID of the control to test (look in the /// page's ASP.NET source code for the ID). |
container | Tester | A tester for the control's container. /// (In the page's ASP.NET source code, look for the tag that the /// control is nested in. That's probably the control's /// container.) If testing a page with multiple forms or a non-default /// HttpClient, pass in the WebFormTester for the form this tag is within. |
return | System |
public HtmlTagTester ( string xpath, string description ) : System | ||
xpath | string | The XPath description of the tag. |
description | string | A human-readable description of this tag (for error reporting). |
return | System |
public HtmlTagTester ( string xpath, string description, Tester container ) : System | ||
xpath | string | The XPath description of the tag. |
description | string | A human-readable description of this tag (for error reporting). |
container | Tester | A tester for the control's container. A WebFormTester /// will usually be most appropriate. |
return | System |
public OptionalAttribute ( string name ) : string | ||
name | string | The name of the attribute. |
return | string |
public static TestInstance ( string htmlPage, string xpath ) : HtmlTagTester | ||
htmlPage | string | |
xpath | string | |
return | HtmlTagTester |
public static TestInstance ( string htmlPage, string id, string description ) : HtmlTagTester | ||
htmlPage | string | |
id | string | |
description | string | |
return | HtmlTagTester |