ContentVerification class
A standalone content verification system for WebF that checks if actual content has been rendered instead of a blank screen. This can be used by applications to verify content visibility before taking screenshots, running tests, or reporting custom metrics.
Example usage:
final controller = WebFController(...);
// ... after page loads ...
if (ContentVerification.hasVisibleContent(controller)) {
print('Page has visible content');
} else {
print('Page appears to be blank');
}
// Get detailed information
final info = ContentVerification.getContentInfo(controller);
print('Visible elements: ${info.totalElements}');
print('Text elements: ${info.textElements}');
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
elementHasVisibleContent(
Element element) → bool - Verifies if a specific element has rendered visible content
-
getContentInfo(
WebFController controller) → ContentInfo - Gets detailed content information from a WebFController
-
getContentInfoFromDocument(
Document document) → ContentInfo - Gets detailed content information from a document
-
getTotalVisibleContentArea(
Document document) → double - Gets the total visible content area in the document
-
hasVisibleContent(
WebFController controller) → bool - Convenient method to check content visibility from a WebFController
-
hasVisibleContentInDocument(
Document document) → bool - Verifies if the document has any visible content rendered
-
waitForVisibleContent(
WebFController controller, {Duration timeout = const Duration(seconds: 10), Duration checkInterval = const Duration(milliseconds: 100)}) → Future< bool> - Waits for visible content to appear with a timeout