ArtOfTest, Inc. - WebAii 1.1 Automation Infrastructure reference library
Find.AllByContent(content, contentType) method
Namespaces > ArtOfTest.WebAii.Core > Find > AllByContent(String, FindContentType)
Returns a list of elements that match the specified content. The content must start with: 'l:' for exact match strings, 'p:' for partial strings or 'x:' for regular expression matches. If none are provided, the string will be matched using an exact match 'l:'. All searches are case-insensitive.
Examples
To find tags with TextContent of: 'foo bar' Example 1: ByContent("l:foo bar"); Example 2: ByContent("p:foo"); Example 3: ByContent("x:[*foo*]");
Remarks
There is a difference between FindContentType.InnerText and FindContentType.TextContent that is worth noting: Example:
Text1
Text2
InnerText for div1 : Text1Text2 {recursive} TextContent of div1 : Text1 {non-recursive} Default for ByContent is TextContent which is the most common usage.
Syntax
C#
public ReadOnlyCollection<Element> AllByContent (
	string content,
	FindContentType contentType
)
Parameters
content (String)
The content to match
contentType (FindContentType)
The content type to match.
Return Value
The list of found elements.

Assembly: ArtOfTest.WebAii (Module: ArtOfTest.WebAii)