Click or drag to resize

WebCellElementPatterncontentText Property

The text the sought-for cell contains (including the text of child elements). By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).

Namespace:  SmartBear.TestLeft.TestObjects.Web
Assembly:  SmartBear.TestLeft (in SmartBear.TestLeft.dll) Version: 14.70.237.11 (14.70.237.11)
Syntax
public string contentText { get; set; }

Property Value

Type: String
Remarks
The resulting string contains the combined text contents of the object and of all of its child objects. This text includes visible elements as well as hidden ones, that is, the elements with style.display="none" or style.visibility="hidden".

TestLeft generates the contentText property value in the following way:

  1. The test engine analyzes the cell's DOM child nodes and finds all text nodes among them (that is, nodes with nodeName equal to #text).
  2. For each text node, TestLeft gets the node's nodeValue property, trims whitespaces at the beginning and at the end of the value and replaces subsequent spaces, tabs, non-breaking spaces and line breaks with a single space.
  3. Adds a line feed character to the end each value.
See Also