Public Member Functions | |
| def | get_list_items (self, locator, values=False) |
Returns all labels or values of selection list locator. More... | |
| def | get_selected_list_label (self, locator) |
Returns label of selected option from selection list locator. More... | |
| def | get_selected_list_labels (self, locator) |
Returns labels of selected options from selection list locator. More... | |
| def | get_selected_list_value (self, locator) |
Returns value of selected option from selection list locator. More... | |
| def | get_selected_list_values (self, locator) |
Returns values of selected options from selection list locator. More... | |
| def | list_selection_should_be (self, locator, *expected) |
Verifies selection list locator has expected options selected. More... | |
| def | list_should_have_no_selections (self, locator) |
Verifies selection list locator has no options selected. More... | |
| def | page_should_contain_list (self, locator, message=None, loglevel='TRACE') |
Verifies selection list locator is found from current page. More... | |
| def | page_should_not_contain_list (self, locator, message=None, loglevel='TRACE') |
Verifies selection list locator is not found from current page. More... | |
| def | select_all_from_list (self, locator) |
Selects all options from multi-selection list locator. More... | |
| def | select_from_list_by_index (self, locator, *indexes) |
Selects options from selection list locator by indexes. More... | |
| def | select_from_list_by_label (self, locator, *labels) |
Selects options from selection list locator by labels. More... | |
| def | select_from_list_by_value (self, locator, *values) |
Selects options from selection list locator by values. More... | |
| def | unselect_all_from_list (self, locator) |
Unselects all options from multi-selection list locator. More... | |
| def | unselect_from_list_by_index (self, locator, *indexes) |
Unselects options from selection list locator by indexes. More... | |
| def | unselect_from_list_by_label (self, locator, *labels) |
Unselects options from selection list locator by labels. More... | |
| def | unselect_from_list_by_value (self, locator, *values) |
Unselects options from selection list locator by values. More... | |
Public Member Functions inherited from SeleniumLibrary.base.librarycomponent.LibraryComponent | |
| 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) |
Public Member Functions inherited from SeleniumLibrary.base.context.ContextAware | |
| 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) |
Private Member Functions | |
| def | _format_selection (self, labels, values) |
| def | _get_labels (self, options) |
| def | _get_options (self, locator) |
| def | _get_select_list (self, locator) |
| def | _get_selected_options (self, locator) |
| def | _get_values (self, options) |
Additional Inherited Members | |
Public Attributes inherited from SeleniumLibrary.base.context.ContextAware | |
| ctx | |
Properties inherited from SeleniumLibrary.base.librarycomponent.LibraryComponent | |
| log_dir = property | |
Properties inherited from SeleniumLibrary.base.context.ContextAware | |
| driver = property | |
| drivers = property | |
| element_finder = property | |
Definition at line 24 of file selectelement.py.
|
private |
Definition at line 133 of file selectelement.py.
|
private |
Definition at line 343 of file selectelement.py.
|
private |
Definition at line 337 of file selectelement.py.
|
private |
Definition at line 333 of file selectelement.py.
|
private |
Definition at line 340 of file selectelement.py.
|
private |
Definition at line 346 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.get_list_items | ( | self, | |
| locator, | |||
values = False |
|||
| ) |
Returns all labels or values of selection list locator.
See the `Locating elements` section for details about the locator
syntax.
Returns visible labels by default, but values can be returned by
setting the ``values`` argument to a true value (see `Boolean
arguments`).
Example:
| ${labels} = | `Get List Items` | mylist | |
| ${values} = | `Get List Items` | css:#example select | values=True |
Support to return values is new in SeleniumLibrary 3.0.
Definition at line 42 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.get_selected_list_label | ( | self, | |
| locator | |||
| ) |
Returns label of selected option from selection list locator.
If there are multiple selected options, label of the first option
is returned.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 58 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.get_selected_list_labels | ( | self, | |
| locator | |||
| ) |
Returns labels of selected options from selection list locator.
Starting from SeleniumLibrary 3.0, returns an empty list if there
are no selections. In earlier versions this caused an error.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 71 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.get_selected_list_value | ( | self, | |
| locator | |||
| ) |
Returns value of selected option from selection list locator.
If there are multiple selected options, value of the first option
is returned.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 84 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.get_selected_list_values | ( | self, | |
| locator | |||
| ) |
Returns values of selected options from selection list locator.
Starting from SeleniumLibrary 3.0, returns an empty list if there
are no selections. In earlier versions this caused an error.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 97 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.list_selection_should_be | ( | self, | |
| locator, | |||
| * | expected | ||
| ) |
Verifies selection list locator has expected options selected.
It is possible to give expected options both as visible labels and
as values. Starting from SeleniumLibrary 3.0, mixing labels and
values is not possible. Order of the selected options is not
validated.
If no expected options are given, validates that the list has
no selections. A more explicit alternative is using `List Should
Have No Selections`.
See the `Locating elements` section for details about the locator
syntax.
Examples:
| `List Selection Should Be` | gender | Female | |
| `List Selection Should Be` | interests | Test Automation | Python |
Definition at line 120 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.list_should_have_no_selections | ( | self, | |
| locator | |||
| ) |
Verifies selection list locator has no options selected.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 143 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.page_should_contain_list | ( | self, | |
| locator, | |||
message = None, |
|||
loglevel = 'TRACE' |
|||
| ) |
Verifies selection list locator is found from current page.
See `Page Should Contain Element` for explanation about ``message``
and ``loglevel`` arguments.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 162 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.page_should_not_contain_list | ( | self, | |
| locator, | |||
message = None, |
|||
loglevel = 'TRACE' |
|||
| ) |
Verifies selection list locator is not found from current page.
See `Page Should Contain Element` for explanation about ``message``
and ``loglevel`` arguments.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 174 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.select_all_from_list | ( | self, | |
| locator | |||
| ) |
Selects all options from multi-selection list locator.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 183 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.select_from_list_by_index | ( | self, | |
| locator, | |||
| * | indexes | ||
| ) |
Selects options from selection list locator by indexes.
Indexes of list options start from 0.
If more than one option is given for a single-selection list,
the last value will be selected. With multi-selection lists all
specified options are selected, but possible old selections are
not cleared.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 205 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.select_from_list_by_label | ( | self, | |
| locator, | |||
| * | labels | ||
| ) |
Selects options from selection list locator by labels.
If more than one option is given for a single-selection list,
the last value will be selected. With multi-selection lists all
specified options are selected, but possible old selections are
not cleared.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 246 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.select_from_list_by_value | ( | self, | |
| locator, | |||
| * | values | ||
| ) |
Selects options from selection list locator by values.
If more than one option is given for a single-selection list,
the last value will be selected. With multi-selection lists all
specified options are selected, but possible old selections are
not cleared.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 226 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.unselect_all_from_list | ( | self, | |
| locator | |||
| ) |
Unselects all options from multi-selection list locator.
See the `Locating elements` section for details about the locator
syntax.
New in SeleniumLibrary 3.0.
Definition at line 263 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.unselect_from_list_by_index | ( | self, | |
| locator, | |||
| * | indexes | ||
| ) |
Unselects options from selection list locator by indexes.
Indexes of list options start from 0. This keyword works only with
multi-selection lists.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 280 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.unselect_from_list_by_label | ( | self, | |
| locator, | |||
| * | labels | ||
| ) |
Unselects options from selection list locator by labels.
This keyword works only with multi-selection lists.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 321 of file selectelement.py.
| def SeleniumLibrary.keywords.selectelement.SelectElementKeywords.unselect_from_list_by_value | ( | self, | |
| locator, | |||
| * | values | ||
| ) |
Unselects options from selection list locator by values.
This keyword works only with multi-selection lists.
See the `Locating elements` section for details about the locator
syntax.
Definition at line 301 of file selectelement.py.