|
| def | alert_should_be_present (self, text='', action=ACCEPT, timeout=None) |
| | Verifies that an alert is present and, by default, accepts it. More...
|
| |
| def | alert_should_not_be_present (self, action=ACCEPT, timeout=0) |
| | Verifies that no alert is present. More...
|
| |
| def | handle_alert (self, action=ACCEPT, timeout=None) |
| | Handles the current alert and returns its message. More...
|
| |
| def | input_text_into_alert (self, text, action=ACCEPT, timeout=None) |
| | Types the given text into an input field in an alert. More...
|
| |
| def | assert_page_contains (self, locator, tag=None, message=None, loglevel='TRACE') |
| |
| def | assert_page_not_contains (self, locator, tag=None, message=None, loglevel='TRACE') |
| |
| def | debug (self, msg, html=False) |
| |
| def | get_timeout (self, timeout=None) |
| |
| def | info (self, msg, html=False) |
| |
| def | log (self, msg, level='INFO', html=False) |
| |
| def | log_source (self, loglevel='INFO') |
| |
| def | warn (self, msg, html=False) |
| |
| def | __init__ (self, ctx) |
| | Base class exposing attributes from the common context. More...
|
| |
| def | find_element (self, locator, tag=None, required=True, parent=None) |
| | Find element matching locator. More...
|
| |
| def | find_elements (self, locator, tag=None, parent=None) |
| | Find all elements matching locator. More...
|
| |
| def | is_element_enabled (self, locator, tag=None) |
| |
| def | is_text_present (self, text) |
| |
| def | is_visible (self, locator) |
| |
Definition at line 25 of file alert.py.
| def SeleniumLibrary.keywords.alert.AlertKeywords.alert_should_be_present |
( |
|
self, |
|
|
|
text = '', |
|
|
|
action = ACCEPT, |
|
|
|
timeout = None |
|
) |
| |
Verifies that an alert is present and, by default, accepts it.
Fails if no alert is present. If ``text`` is a non-empty string,
then it is used to verify alert's message. The alert is accepted
by default, but that behavior can be controlled by using the
``action`` argument same way as with `Handle Alert`.
``timeout`` specifies how long to wait for the alert to appear.
If it is not given, the global default `timeout` is used instead.
``action`` and ``timeout`` arguments are new in SeleniumLibrary 3.0.
In earlier versions the alert was always accepted and timeout was
hard coded to one second.
Definition at line 65 of file alert.py.
| def SeleniumLibrary.keywords.alert.AlertKeywords.alert_should_not_be_present |
( |
|
self, |
|
|
|
action = ACCEPT, |
|
|
|
timeout = 0 |
|
) |
| |
Verifies that no alert is present.
If the alert actually exists, the ``action`` argument determines
how it should be handled. By default the alert is accepted, but
it can be also dismissed or left open the same way as with the
`Handle Alert` keyword.
``timeout`` specifies how long to wait for the alert to appear.
By default the alert is not waited at all, but a custom time can
be given if alert may be delayed. See the `time format` section
for information about the syntax.
New in SeleniumLibrary 3.0.
Definition at line 86 of file alert.py.
| def SeleniumLibrary.keywords.alert.AlertKeywords.handle_alert |
( |
|
self, |
|
|
|
action = ACCEPT, |
|
|
|
timeout = None |
|
) |
| |
Handles the current alert and returns its message.
By default the alert is accepted, but this can be controlled
with the ``action`` argument that supports the following
case-insensitive values:
- ``ACCEPT``: Accept the alert i.e. press ``Ok``. Default.
- ``DISMISS``: Dismiss the alert i.e. press ``Cancel``.
- ``LEAVE``: Leave the alert open.
The ``timeout`` argument specifies how long to wait for the alert
to appear. If it is not given, the global default `timeout` is used
instead.
Examples:
| Handle Alert | | | # Accept alert. |
| Handle Alert | action=DISMISS | | # Dismiss alert. |
| Handle Alert | timeout=10 s | | # Use custom timeout and accept alert. |
| Handle Alert | DISMISS | 1 min | # Use custom timeout and dismiss alert. |
| ${message} = | Handle Alert | | # Accept alert and get its message. |
| ${message} = | Handle Alert | LEAVE | # Leave alert open and get its message. |
New in SeleniumLibrary 3.0.
Definition at line 119 of file alert.py.
| def SeleniumLibrary.keywords.alert.AlertKeywords.input_text_into_alert |
( |
|
self, |
|
|
|
text, |
|
|
|
action = ACCEPT, |
|
|
|
timeout = None |
|
) |
| |
Types the given text into an input field in an alert.
The alert is accepted by default, but that behavior can be controlled
by using the ``action`` argument same way as with `Handle Alert`.
``timeout`` specifies how long to wait for the alert to appear.
If it is not given, the global default `timeout` is used instead.
New in SeleniumLibrary 3.0.
Definition at line 45 of file alert.py.