message¶
Source code: message.py
Displays a message.
Description¶
This test displays a HTML message to the operator, and wait for the operator pressing space key to pass the test.
If manual_check
is True, the operator can also press escape key to fail the
test.
If seconds
is given, the test would pass automatically after seconds
seconds.
Test Procedure¶
When started, the test will show a message and wait for operator to press space
to pass the test, or press escape to fail the test (if manual_check
is set).
Dependency¶
None.
Examples¶
To show a message, add this in test list:
{
"pytest_name": "message",
"args": {
"html": "i18n! Hello world!"
}
}
To show a message with some formatting, and give operator ability to fail the test:
{
"pytest_name": "message",
"args": {
"text_size": 300,
"manual_check": true,
"show_press_button_hint": true,
"html": "i18n! Please check if the result is <b>correct</b>.",
"text_color": "red"
}
}
To show a message for 20 seconds, and automatically pass:
{
"pytest_name": "message",
"args": {
"seconds": 20,
"html": "i18n! Waiting for something..."
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
html |
str, dict |
Message in HTML |
text_size |
str |
(optional; default: |
text_color |
str |
(optional; default: |
background_color |
str |
(optional; default: |
seconds |
int, None |
(optional; default: |
manual_check |
bool |
(optional; default: |
show_press_button_hint |
bool |
(optional; default: |