FletTestApp
FletTestApp
#
pixel_ratio
#
pixel_ratio = float(
getenv(
"FLET_TEST_SCREENSHOTS_PIXEL_RATIO",
DEFAULT_SCREENSHOTS_PIXEL_RATIO,
)
)
similarity_threshold
#
similarity_threshold = float(
getenv(
"FLET_TEST_SIMILARITY_THRESHOLD",
DEFAULT_SIMILARITY_THRESHOLD,
)
)
tester
#
tester: Tester
Returns an instance of Tester
class
that programmatically interacts with page controls and the test environment.
assert_control_screenshot
#
assert_control_screenshot(
name: str,
control: Control,
pump_times: int = 0,
pump_duration: DurationValue | None = None,
)
Adds control to a clean page, takes a screenshot and compares it with
a golden copy or takes golden screenshot if FLET_TEST_GOLDEN=1
environment variable is set.
PARAMETER | DESCRIPTION |
---|---|
name
|
Screenshot name - will be used as a base for a screenshot filename.
TYPE:
|
control
|
Control to take a screenshot of.
TYPE:
|