Returns a list of elements that have TextContent 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.
To find tags with TextContent of: 'foo bar'
Example 1: ByContent("l:foo bar");
Example 2: ByContent("p:foo");
Example 3: ByContent("x:[*foo*]");
There is a difference between FindContentType.InnerText and FindContentType.TextContent that is worth noting:
Example:
Examples
Remarks
Text1
InnerText for div1 : Text1Text2 {recursive}
TextContent of div1 : Text1 {non-recursive}
Default for ByContent is TextContent which is the most common usage.
Text2
Namespace: ArtOfTest.WebAii.Core
Assembly: ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)
Syntax
Parameters
- textContent
- Type: SystemString
The TextContent to match
Return Value
Type: ReadOnlyCollectionElementThe list of found elements.
See Also