Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.selenium package

Top-level of library designed to ease use of Selenium targetting Galaxy.

galaxy_selenium is purposes being designed to depend on Python selenium, six, pyyaml, and optional pyvirtualdisplay but not galaxy-lib (or any of Galaxy or Galaxy’s test stuff) currently.

Subpackages

Submodules

galaxy.selenium.cli module

galaxy.selenium.cli.add_selenium_arguments(parser)[source]

Add common selenium arguments for argparse driver utility.

class galaxy.selenium.cli.DriverWrapper(args)[source]

Bases: NavigatesGalaxy

Adapt argparse command-line options to a concrete Selenium driver.

__init__(args)[source]
driver: WebDriver
build_url(url='')[source]

Build URL to the target Galaxy.

screenshot(label: str) None[source]

No-op in this context, not saving debugging/testing screenshots.

Consider a verbose or debug option for saving these.

property default_timeout
finish()[source]
timeout_multiplier: float

galaxy.selenium.components module

galaxy.selenium.context module

class galaxy.selenium.context.GalaxySeleniumContext[source]

Bases: NavigatesGalaxy

url: str
target_url_from_selenium: str
configured_driver: ConfiguredDriver
build_url(url: str, for_selenium: bool = True) str[source]

Build URL to the target Galaxy.

property driver
screenshot(label: str)[source]

If GALAXY_TEST_SCREENSHOTS_DIRECTORY is set create a screenshot there named <label>.png.

Unlike the above “snapshot” feature, this will be written out regardless and not in a per-test directory. The above method is used for debugging failures within a specific test. This method if more for creating a set of images to augment automated testing with manual human inspection after a test or test suite has executed.

class galaxy.selenium.context.GalaxySeleniumContextImpl(from_dict: dict | None = None)[source]

Bases: GalaxySeleniumContext

Minimal, simplified GalaxySeleniumContext useful outside the context of test cases.

A variant of this concept that can also populate content via the API to then interact with via the Selenium is galaxy_test.selenium.framework.GalaxySeleniumContextImpl.

__init__(from_dict: dict | None = None) None[source]
configured_driver: ConfiguredDriver
url: str
target_url_from_selenium: str
timeout_multiplier: float
galaxy.selenium.context.init(config=None, clazz=<class 'galaxy.selenium.context.GalaxySeleniumContextImpl'>) GalaxySeleniumContext[source]

galaxy.selenium.data module

galaxy.selenium.driver_factory module

class galaxy.selenium.driver_factory.ConfiguredDriver(browser='auto', remote=False, remote_host='127.0.0.1', remote_port='4444', headless=False)[source]

Bases: object

__init__(browser='auto', remote=False, remote_host='127.0.0.1', remote_port='4444', headless=False)[source]
driver: WebDriver
to_dict()[source]
static from_dict(as_dict)[source]
galaxy.selenium.driver_factory.get_local_driver(browser='auto', headless=False) WebDriver[source]
galaxy.selenium.driver_factory.get_remote_driver(host, port, browser='auto') WebDriver[source]
galaxy.selenium.driver_factory.is_virtual_display_available()[source]
galaxy.selenium.driver_factory.virtual_display_if_enabled(enabled)[source]

galaxy.selenium.has_driver module

A mixin to extend a class that has self.driver with higher-level constructs.

This should be mixed into classes with a self.driver and self.default_timeout attribute.

galaxy.selenium.has_driver.exception_indicates_click_intercepted(exception)[source]
galaxy.selenium.has_driver.exception_indicates_not_clickable(exception)[source]
galaxy.selenium.has_driver.exception_indicates_stale_element(exception)[source]
class galaxy.selenium.has_driver.HasDriver[source]

Bases: object

by

alias of By

keys

alias of Keys

driver: WebDriver
axe_script_url: str = 'https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.7.1/axe.min.js'
axe_skip: bool = False
re_get_with_query_params(params_str: str)[source]
assert_xpath(xpath: str)[source]
assert_selector(selector: str)[source]
assert_selector_absent_or_hidden(selector: str)[source]
assert_absent_or_hidden(selector_template: Target)[source]
assert_disabled(selector_template: Target)[source]
selector_is_displayed(selector: str)[source]
is_displayed(selector_template: Target) bool[source]
assert_selector_absent(selector: str)[source]
find_elements(selector_template: Target) List[WebElement][source]
assert_absent(selector_template: Target) None[source]
element_absent(selector_template: Target) bool[source]
wait_for_xpath(xpath: str, **kwds) WebElement[source]
wait_for_xpath_visible(xpath: str, **kwds) WebElement[source]
wait_for_selector(selector: str, **kwds) WebElement[source]
wait_for_present(selector_template: Target, **kwds) WebElement[source]
wait_for_visible(selector_template: Target, **kwds) WebElement[source]
wait_for_selector_visible(selector: str, **kwds) WebElement[source]
wait_for_selector_clickable(selector: str, **kwds) WebElement[source]
wait_for_clickable(selector_template: Target, **kwds) WebElement[source]
wait_for_selector_absent_or_hidden(selector: str, **kwds) WebElement[source]
wait_for_selector_absent(selector: str, **kwds) WebElement[source]
wait_for_element_count_of_at_least(selector_template: Target, n: int, **kwds) WebElement[source]
wait_for_absent(selector_template: Target, **kwds) WebElement[source]
wait_for_absent_or_hidden(selector_template: Target, **kwds) WebElement[source]
wait_for_id(id: str, **kwds) WebElement[source]
click(selector_template: Target)[source]
action_chains()[source]
send_enter(element: WebElement | None = None)[source]
send_escape(element: WebElement | None = None)[source]
send_backspace(element: WebElement | None = None)[source]
abstract timeout_for(**kwds) float[source]
wait(timeout=<object object>, **kwds)[source]
click_xpath(xpath: str)[source]
click_label(text: str)[source]
click_selector(selector: str)[source]
fill(form: WebElement, info: dict)[source]
click_submit(form: WebElement)[source]
prepend_timeout_message(timeout_exception: TimeoutException, message: str) TimeoutException[source]
accept_alert()[source]
find_element_by_xpath(xpath: str, element: WebElement | None = None) WebElement[source]
find_element_by_id(id: str, element: WebElement | None = None) WebElement[source]
find_element_by_selector(selector: str, element: WebElement | None = None) WebElement[source]
axe_eval(context: str | None = None, write_to: str | None = None) AxeResults[source]
galaxy.selenium.has_driver.SeleniumTimeoutException

alias of TimeoutException

galaxy.selenium.jupyter_context module

galaxy.selenium.jupyter_context.init(config=None)[source]
class galaxy.selenium.jupyter_context.JupyterContextImpl(from_dict: dict | None = None)[source]

Bases: GalaxySeleniumContextImpl

screenshot(label)[source]

If GALAXY_TEST_SCREENSHOTS_DIRECTORY is set create a screenshot there named <label>.png.

Unlike the above “snapshot” feature, this will be written out regardless and not in a per-test directory. The above method is used for debugging failures within a specific test. This method if more for creating a set of images to augment automated testing with manual human inspection after a test or test suite has executed.

url: str
target_url_from_selenium: str
configured_driver: ConfiguredDriver
timeout_multiplier: float

galaxy.selenium.navigates_galaxy module

A mixin that extends a HasDriver class with Galaxy-specific utilities.

Implementer must provide a self.build_url method to target Galaxy.

class galaxy.selenium.navigates_galaxy.WaitType(name, default_length)

Bases: tuple

default_length

Alias for field number 1

name

Alias for field number 0

class galaxy.selenium.navigates_galaxy.HistoryEntry(id, hid, history_content_type)[source]

Bases: tuple

id: str

Alias for field number 0

hid: str

Alias for field number 1

history_content_type: str

Alias for field number 2

class galaxy.selenium.navigates_galaxy.WAIT_TYPES[source]

Bases: object

UX_RENDER = WaitType(name='ux_render', default_length=1)
UX_TRANSITION = WaitType(name='ux_transition', default_length=5)
UX_POPUP = WaitType(name='ux_popup', default_length=15)
DATABASE_OPERATION = WaitType(name='database_operation', default_length=10)
JOB_COMPLETION = WaitType(name='job_completion', default_length=30)
GIE_SPAWN = WaitType(name='gie_spawn', default_length=30)
REPO_INSTALL = WaitType(name='repo_install', default_length=60)
HISTORY_POLL = WaitType(name='history_poll', default_length=3)
class galaxy.selenium.navigates_galaxy.NullTourCallback[source]

Bases: object

handle_step(step, step_index)[source]
galaxy.selenium.navigates_galaxy.exception_seems_to_indicate_transition(e)[source]

True if exception seems to indicate the page state is transitioning.

Galaxy features many different transition effects that change the page state over time. These transitions make it slightly more difficult to test Galaxy because atomic input actions take an indeterminate amount of time to be reflected on the screen. This method takes a Selenium assertion and tries to infer if such a transition could be the root cause of the exception. The methods that follow use it to allow retrying actions during transitions.

Currently the two kinds of exceptions that we say may indicate a transition are StaleElement exceptions (a DOM element grabbed at one step is no longer available) and “not clickable” exceptions (so perhaps a popup modal is blocking a click).

galaxy.selenium.navigates_galaxy.retry_call_during_transitions(f, attempts=10, sleep=0.1, exception_check=<function exception_seems_to_indicate_transition>)[source]
galaxy.selenium.navigates_galaxy.retry_during_transitions(f, attempts=10, sleep=0.1, exception_check=<function exception_seems_to_indicate_transition>)[source]
galaxy.selenium.navigates_galaxy.edit_details(f, scope='.history-index')[source]

Open the editor, run the edits, hit the save button

class galaxy.selenium.navigates_galaxy.NavigatesGalaxy[source]

Bases: HasDriver

Class with helpers methods for driving components of the Galaxy interface.

In most cases, methods for interacting with Galaxy components that appear in multiple tests or applications should be refactored into this class for now. Keep in mind that this class is used outside the context of TestCase s as well - so some methods more explicitly related to test data or assertion checking may make more sense in SeleniumTestCase for instance.

Some day this class will likely be split up into smaller mixins for particular components of Galaxy, but until that day the best practice is to prefix methods for driving or querying the interface with the name of the component or page the method operates on. These serve as pseudo-namespaces until we decompose this class. For instance, the method for clicking an option in the workflow editor is workflow_editor_click_option instead of click_workflow_editor_option.

timeout_multiplier: float
driver: WebDriver
abstract build_url(url: str, for_selenium: bool = True) str[source]

Build URL to the target Galaxy.

abstract screenshot(label: str) None[source]

Take a screenshot of the current browser with the specified label.

screenshot_if(label: str | None) str | None[source]
default_password = '123456'
wait_types

alias of WAIT_TYPES

get(url: str = '')[source]

Expand supplied relative URL and navigate to page using Selenium driver.

property navigation: Component
property components: SmartComponent

Fetch root component describing the Galaxy DOM.

wait_length(wait_type: WaitType) float[source]

Return the wait time specified by wait_type after applying timeout_multipler.

timeout_multiplier is used in production CI tests to reduce transient failures in a uniform way across test suites to expand waiting.

sleep_for(wait_type: WaitType) None[source]

Sleep on the Python client side for the specified wait_type.

This method uses wait_length to apply any timeout_multiplier.

sleep_for_seconds(duration: float) None[source]

Sleep in the local thread for specified number of seconds.

Ideally, we would be sleeping on the Selenium server instead of in the local client (e.g. test) thread.

timeout_for(wait_type: WaitType = WaitType(name='database_operation', default_length=10), **kwd) float[source]
home() None[source]

Return to root Galaxy page and wait for some basic widgets to appear.

go_to_trs_by_id() None[source]
go_to_workflow_sharing(workflow_id: str) None[source]
go_to_workflow_export(workflow_id: str) None[source]
go_to_history_sharing(history_id: str) None[source]
switch_to_main_panel()[source]
local_storage(key: str, value: float | str)[source]

Method decorator to modify localStorage for the scope of the supplied context.

main_panel()[source]

Decorator to operate within the context of Galaxy’s main frame.

api_get(endpoint, data=None, raw=False)[source]
api_post(endpoint, data=None)[source]
api_delete(endpoint, raw=False)[source]
get_galaxy_session()[source]
selenium_to_requests_cookies()[source]
history_panel_name_element()[source]
history_panel_name()[source]
history_panel_collection_rename(hid: int, new_name: str, assert_old_name: str | None = None)[source]
history_panel_expand_collection(collection_hid: int) SmartComponent[source]
history_panel_collection_name_element()[source]
make_accessible_and_publishable()[source]
history_contents(history_id=None, view='summary', datasets_only=True)[source]
current_history() Dict[str, Any][source]
current_history_id() str[source]
current_history_publish()[source]
latest_history_entry()[source]
latest_history_item() Dict[str, Any][source]
wait_for_history(assert_ok=True)[source]
history_panel_create_new_with_name(name)[source]
history_panel_create_new()[source]

Click create new and pause a bit for the history to begin to refresh.

history_panel_wait_for_hid_ok(hid, allowed_force_refreshes=0)[source]
history_panel_wait_for_hid_deferred(hid, allowed_force_refreshes=0)[source]
wait_for_hid_ok_and_open_details(hid)[source]
history_panel_item_component(history_item=None, hid=None, multi_history_panel=False)[source]
wait_for_history_to_have_hid(history_id, hid)[source]
history_panel_wait_for_hid_visible(hid, allowed_force_refreshes=0, multi_history_panel=False)[source]
hid_to_history_item(hid, current_history_id=None)[source]
history_item_wait_for(history_item_selector, allowed_force_refreshes)[source]
history_panel_wait_for_history_loaded()[source]
history_panel_wait_for_hid_hidden(hid, multi_history_panel=False)[source]
history_panel_wait_for_hid_state(hid, state, allowed_force_refreshes=0, multi_history_panel=False)[source]
get_grid_entry_names(selector)[source]
select_grid_operation(item_name, option_label)[source]
select_grid_cell(grid_name, item_name, column_index=3)[source]
check_grid_rows(grid_name, item_names)[source]
check_advanced_search_filter(filter_name)[source]
published_grid_search_for(search_term=None)[source]
get_logged_in_user() Dict[str, Any] | None[source]
get_api_key(force=False) str | None[source]
get_user_id() str | None[source]
get_user_email() str[source]
is_logged_in() bool[source]
submit_login(email, password=None, assert_valid=True, retries=0)[source]
fill_login_and_submit(email, password=None)[source]
register(email=None, password=None, username=None, confirm=None, assert_valid=True)[source]
wait_for_logged_in()[source]
click_center()[source]
hover_over(target)[source]
perform_single_upload(test_path, **kwd) HistoryEntry[source]
perform_upload(test_path, **kwd)[source]
perform_upload_of_pasted_content(paste_data, **kwd)[source]
perform_upload_of_composite_dataset_pasted_data(ext, paste_content)[source]
upload_list(test_paths, name='test', ext=None, genome=None, hide_source_items=True)[source]
upload_pair(test_paths, name='test', ext=None, genome=None, hide_source_items=True)[source]
upload_paired_list(test_paths, name='test', ext=None, genome=None, hide_source_items=True)[source]
upload_tab_click(tab)[source]
upload_start_click()[source]
upload_set_collection_type(collection_type)[source]
upload_start(tab_id='regular')[source]
upload_build(tab='collection')[source]
upload_queue_local_file(test_path, tab_id='regular')[source]
upload_paste_data(pasted_content, tab_id='regular')[source]
upload_rule_start()[source]
upload_rule_build()[source]
upload_rule_dataset_dialog()[source]
upload_rule_set_data_type(type_description)[source]
upload_rule_set_dataset(row=1)[source]
rule_builder_set_collection_name(name)[source]
rule_builder_set_extension(extension)[source]
rule_builder_filter_count(count=1)[source]
rule_builder_sort(column_label, screenshot_name=None)[source]
rule_builder_add_regex_groups(column_label, group_count, regex, screenshot_name)[source]
rule_builder_add_regex_replacement(column_label, regex, replacement, screenshot_name=None)[source]
rule_builder_add_value(value, screenshot_name=None)[source]
rule_builder_remove_columns(column_labels, screenshot_name=None)[source]
rule_builder_concatenate_columns(column_label_1, column_label_2, screenshot_name=None)[source]
rule_builder_split_columns(column_labels_1, column_labels_2, screenshot_name=None)[source]
rule_builder_swap_columns(column_label_1, column_label_2, screenshot_name)[source]
rule_builder_rule_editor(rule_type)[source]
rule_builder_set_mapping(mapping_type, column_label, screenshot_name=None)[source]
rule_builder_set_source(json)[source]
rule_builder_enter_source_text(json)[source]
workflow_editor_set_license(license: str) None[source]
workflow_editor_click_option(option_label)[source]
workflow_editor_click_options()[source]
workflow_editor_options_menu_element()[source]
workflow_editor_click_run()[source]
workflow_editor_click_save()[source]
navigate_to_histories_page()[source]
navigate_to_histories_shared_with_me_page()[source]
navigate_to_user_preferences()[source]
navigate_to_invocations()[source]
navigate_to_pages()[source]
navigate_to_published_workflows()[source]
navigate_to_published_histories()[source]
navigate_to_published_pages()[source]
admin_open()[source]
create_quota(name: str | None = None, description: str | None = None, amount: str | None = None, quota_source_label: str | None = None, user: str | None = None)[source]
select_dataset_from_lib_import_modal(filenames)[source]
create_new_library()[source]
libraries_open()[source]
libraries_open_with_name(name)[source]
page_open_and_screenshot(page_name, screenshot_name)[source]
libraries_index_table_elements()[source]
libraries_index_create(name)[source]
libraries_index_sort_selector()[source]
libraries_index_sort_click()[source]
libraries_index_search_for(text)[source]
libraries_folder_create(name)[source]
libraries_click_dataset_import()[source]
libraries_dataset_import(btn)[source]
libraries_dataset_import_from_history_select(to_select_items)[source]
libraries_dataset_import_from_history_click_ok(wait=True)[source]
libraries_table_elements()[source]
populate_library_folder_from_import_dir(library_name, filenames)[source]
navigate_to_new_library()[source]
wait_for_overlays_cleared()[source]

Wait for modals and Toast notifications to disappear.

clear_tooltips()[source]
pages_index_table_elements()[source]
workflow_index_open()[source]
workflow_shared_with_me_open()[source]
workflow_card_elements()[source]
workflow_card_element(workflow_index=0)[source]
workflow_index_column_text(column_index, workflow_index=0)[source]
workflow_index_get_current_filter()[source]
workflow_index_search_for(search_term=None)[source]
workflow_index_click_import()[source]
workflow_rename(new_name, workflow_index=0)[source]
workflow_delete_by_name(name)[source]
workflow_index_name(workflow_index=0)[source]
select_dropdown_item(option_title)[source]
workflow_share_click()[source]
workflow_index_click_tag_display(workflow_index=0)[source]
workflow_index_add_tag(tag: str, workflow_index: int = 0)[source]
workflow_index_tags(workflow_index=0)[source]
workflow_index_tag_elements(workflow_index=0)[source]
workflow_index_click_tag(tag, workflow_index=0)[source]
workflow_import_submit_url(url)[source]
workflow_sharing_click_publish()[source]
tagging_add(tags, auto_closes=True, parent_selector='')[source]
workflow_run_with_name(name: str)[source]
workflow_run_specify_inputs(inputs: Dict[str, Any])[source]
workflow_run_submit()[source]
workflow_run_ensure_expanded()[source]
workflow_create_new(annotation=None, clear_placeholder=False)[source]
invocation_index_table_elements()[source]
tool_open(tool_id, outer=False)[source]
datasource_tool_open(tool_id)[source]
run_environment_test_tool(inttest_value='42', select_storage: str | None = None)[source]
select_storage(storage_id: str) None[source]
create_page_and_edit(name=None, slug=None, screenshot_name=None)[source]
create_page(name=None, slug=None, screenshot_name=None)[source]
tool_parameter_div(expanded_parameter_id)[source]
tool_parameter_edit_rules()[source]
tool_set_value(expanded_parameter_id, value, expected_type=None)[source]
tool_form_generate_tour()[source]
tool_form_execute()[source]
click_masthead_user()[source]
click_masthead_data()[source]
click_masthead_workflow()[source]
click_button_new_workflow()[source]
wait_for_sizzle_selector_clickable(selector)[source]
click_history_options()[source]
click_history_option_export_to_file()[source]
click_history_option_sharing()[source]
click_history_option(option_label_or_component)[source]
history_element(attribute_value, attribute_name='data-description', scope='.history-index')[source]
content_item_by_attributes(multi_history_panel=False, **attrs)[source]
history_click_create_new()[source]
history_click_editor_save()[source]
history_panel_click_copy_elements()[source]
use_bootstrap_dropdown(option=None, menu=None)[source]

uses bootstrap dropdown by data-description attributes

history_panel_add_tags(tags)[source]
history_panel_rename(new_name)[source]
history_panel_name_input()[source]
history_panel_click_to_rename()[source]
history_panel_refresh_click()[source]
history_panel_multi_operations_show()[source]
history_panel_muli_operation_select_hid(hid)[source]
history_panel_multi_operation_action_click(action)[source]
open_history_multi_view()[source]
history_multi_view_display_collection_contents(collection_hid, collection_type='list')[source]
history_panel_item_edit(hid)[source]
history_panel_item_view_dataset_details(hid)[source]
history_panel_item_click_visualization_menu(hid)[source]
history_panel_item_available_visualizations_elements(hid)[source]
history_panel_item_get_tags(hid)[source]
history_panel_item_available_visualizations(hid)[source]
history_panel_item_click_visualization(hid, visualization_name)[source]
history_panel_item_selector(hid, wait=False)[source]
modal_body_selector()[source]
history_panel_item_body_component(hid, wait=False)[source]
hda_click_primary_action_button(hid: int, button_key: str)[source]
hda_click_details(hid: int)[source]
history_panel_click_item_title(hid, **kwds)[source]
history_panel_ensure_showing_item_details(hid)[source]
history_panel_item_showing_details(hid)[source]
collection_builder_set_name(name)[source]
collection_builder_hide_originals()[source]
collection_builder_create()[source]
collection_builder_clear_filters()[source]
collection_builder_click_paired_item(forward_or_reverse, item)[source]
logout_if_needed()[source]
logout()[source]
run_tour(path, skip_steps=None, sleep_on_steps=None, tour_callback=None)[source]
tour_wait_for_clickable_element(selector)[source]
tour_wait_for_element_present(selector)[source]
get_tooltip_text(element, sleep=0, click_away=True)[source]
assert_selector_absent_or_hidden_after_transitions(selector)[source]

Variant of assert_selector_absent_or_hidden that retries during transitions.

In the parent method - the element is found and then it is checked to see if it is visible. It may disappear from the page in the middle there and cause a StaleElement error. For checks where we care about the final resting state after transitions - this method can be used to retry during those transitions.

assert_absent_or_hidden_after_transitions(selector)[source]

Variant of assert_absent_or_hidden that retries during transitions.

See details above for more information about this.

assert_tooltip_text(element, expected: str | Label | Text, sleep: int = 0, click_away: bool = True)[source]
assert_tooltip_text_contains(element, expected: str | Label | Text, sleep: int = 0, click_away: bool = True)[source]
assert_error_message(contains=None)[source]
assert_warning_message(contains=None)[source]
assert_success_message(contains=None)[source]
assert_message(element, contains=None)[source]
assert_no_error_message()[source]
run_tour_step(step, step_index, tour_callback)[source]
wait_for_and_click_selector(selector)[source]
wait_for_and_click(selector_template)[source]
set_history_annotation(annotation, clear_text=False)[source]
ensure_history_annotation_area_displayed()[source]
select_set_value(container_selector_or_elem, value, multiple=False)[source]
select2_set_value(container_selector_or_elem, value, with_click=True, clear_value=False)[source]
snapshot(description)[source]

Test case subclass overrides this to provide detailed logging.

open_history_editor(scope='.history-index')[source]
close_history_editor(scope='.history-index')[source]
share_ensure_by_user_available(sharing_component)[source]
share_unshare_with_user(sharing_component, email)[source]
share_with_user(sharing_component, user_id=None, user_email=None, screenshot_before_submit=None, screenshot_after_submit=None, assert_valid=False)[source]
tutorial_mode_activate()[source]
mouse_drag(from_element: WebElement, to_element: WebElement | None = None, from_offset=(0, 0), to_offset=(0, 0), via_offsets: List[Tuple[int, int]] | None = None)[source]
exception galaxy.selenium.navigates_galaxy.NotLoggedInException(timeout_exception, user_info, dom_message)[source]

Bases: TimeoutException

__init__(timeout_exception, user_info, dom_message)[source]
exception galaxy.selenium.navigates_galaxy.ClientBuildException(timeout_exception: TimeoutException)[source]

Bases: TimeoutException

__init__(timeout_exception: TimeoutException)[source]

galaxy.selenium.sizzle module

Utilities for using sizzle (jQuery-style) selectors with Selenium.

galaxy.selenium.sizzle.find_element_by_sizzle(driver, sizzle_selector: str)[source]

Finds an element by sizzle selector.

Parameters:

sizzle_selector – The sizzle selector to use when finding element.

galaxy.selenium.sizzle.find_elements_by_sizzle(driver, sizzle_selector: str)[source]

Finds elements by sizzle selector.

Parameters:

sizzle_selector – The sizzle selector to use when finding elements.

galaxy.selenium.sizzle.sizzle_selector_clickable(selector)[source]
galaxy.selenium.sizzle.sizzle_presence_of_selector(selector)[source]

galaxy.selenium.smart_components module

class galaxy.selenium.smart_components.SmartComponent(component, has_driver)[source]

Bases: object

Wrap a Component with driver aware methods.

Adapts Galaxy’s component locators more tightly to Selenium - including a Selenium runtime. Allows smarter selectors that know how to wait for themselves, test themselves, click themselves, etc…. More “magic”, but much cleaner usage.

__init__(component, has_driver)[source]
class galaxy.selenium.smart_components.SmartTarget(target, has_driver)[source]

Bases: object

Wrap a Target with driver aware methods.

__init__(target, has_driver)[source]
all()[source]
wait_for_element_count_of_at_least(n: int, **kwds)[source]
wait_for_and_click(**kwds)[source]
wait_for_visible(**kwds)[source]
wait_for_select(**kwds)[source]
wait_for_clickable(**kwds)[source]
wait_for_text(**kwds)[source]
wait_for_value(**kwds)[source]
property is_displayed
property is_absent
wait_for_absent_or_hidden(**kwds)[source]
wait_for_absent(**kwds)[source]
wait_for_present(**kwds)[source]
assert_absent(**kwds)[source]
assert_absent_or_hidden(**kwds)[source]
assert_absent_or_hidden_after_transitions(**kwds)[source]
assert_disabled(**kwds)[source]
data_value(attribute: str)[source]
assert_data_value(attribute: str, expected_value: str)[source]
has_class(class_name)[source]
wait_for_and_send_keys(*text)[source]
wait_for_and_clear_and_send_keys(*text)[source]
axe_eval() AxeResults[source]
assert_no_axe_violations_with_impact_of_at_least(impact: typing_extensions.Literal[minor, moderate, serious, critical], excludes: List[str] | None = None) None[source]