Verify Not Empty
I would like to verify the text content of an element is not empty. In other words, that it contains one or more characters.
This is possible with a coded solution. The example below is against this W3Schools site.
Advanced Topics / Coded Samples / General
New to Telerik Test Studio? Download free 30-day trial
I would like to verify the text content of an element is not empty. In other words, that it contains one or more characters.
This is possible with a coded solution. The example below is against this W3Schools site.
HtmlTable table = Find.ByTagIndex<HtmlTable>("table", 0);
HtmlTableRow row = table.Rows[0];
HtmlTableCell cell = row.Cells[1];
Log.WriteLine(cell.TextContent);
Assert.IsTrue(cell.TextContent.Length > 0);
Dim table As HtmlTable = Find.ByTagIndex(Of HtmlTable)("table", 0)
Dim row As HtmlTableRow = table.Rows(0)
Dim cell As HtmlTableCell = row.Cells(1)
Log.WriteLine(cell.TextContent)
Assert.IsTrue(cell.TextContent.Length > 0)
Copyright © 2025 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.