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.
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 browser automation driver.
-
__init__(args)[source]
-
build_url(url='', for_selenium: bool = True)[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]
Clean up driver and display resources.
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.
-
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]
-
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(timeout_handler: Callable[[WaitTypeT | None], float], browser: str = 'auto', remote: bool = False, remote_host: str = '127.0.0.1', remote_port: str = '4444', headless: bool = False, backend_type: Literal['selenium', 'playwright'] = 'selenium')[source]
Bases: object
Configured driver factory supporting both Selenium and Playwright backends.
This class creates and manages either a Selenium WebDriver or Playwright driver
based on the backend_type parameter. It provides a unified interface via
HasDriverProtocol for both implementations.
- Attributes:
driver_impl: The HasDriverProtocol implementation (HasDriver or HasPlaywrightDriver)
config: Configuration dictionary for serialization
backend_type: Which backend is being used (“selenium” or “playwright”)
-
__init__(timeout_handler: Callable[[WaitTypeT | None], float], browser: str = 'auto', remote: bool = False, remote_host: str = '127.0.0.1', remote_port: str = '4444', headless: bool = False, backend_type: Literal['selenium', 'playwright'] = 'selenium')[source]
Initialize a configured driver with the specified backend.
- Args:
timeout_handler: Callback function that returns timeout value for wait operations
browser: Browser name (“auto”, “CHROME”, “FIREFOX”, etc.)
remote: Whether to use remote Selenium Grid (Selenium only)
remote_host: Remote Selenium Grid host
remote_port: Remote Selenium Grid port
headless: Whether to run browser in headless mode
backend_type: Which backend to use (“selenium” or “playwright”)
- Raises:
Exception: If Playwright backend is requested with remote=True
Exception: If Playwright is not installed when backend_type=”playwright”
-
backend_type: Literal['selenium', 'playwright']
-
config: dict[str, Any]
-
driver_impl: HasDriverProtocol[Any]
-
to_dict() → dict[str, Any][source]
Serialize configuration to dictionary.
-
static from_dict(timeout_handler: Callable[[WaitTypeT | None], float], as_dict: dict[str, Any]) → ConfiguredDriver[source]
Deserialize configuration from dictionary.
-
quit() → None[source]
Clean up and close the driver.
-
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.get_playwright_browser_type(browser: str = 'auto') → Literal['chromium', 'firefox', 'webkit'][source]
Map Selenium browser names to Playwright browser types.
- Args:
browser: Browser name (CHROME, FIREFOX, auto, etc.)
- Returns:
Playwright browser type: ‘chromium’, ‘firefox’, or ‘webkit’
This matches the BrowserType.name property values.
- Raises:
NotImplementedError: If browser type has no direct Playwright mapping
-
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: TimeoutMessageMixin, WaitMethodsMixin, Generic[WaitTypeT]
-
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
-
property backend_type: Literal['selenium', 'playwright']
Identify this as the Selenium backend implementation.
-
property current_url: str
Get the current page URL.
- Returns:
The current URL
-
property page_source: str
Get the HTML source of the current page.
- Returns:
The page HTML as a string
-
property page_title: str
Get the title of the current page.
- Returns:
The page title as a string
-
navigate_to(url: str) → None[source]
Navigate to a URL.
- Args:
url: The URL to navigate to
-
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[WebElementProtocol][source]
-
find_element(selector_template: Target | tuple[str, str]) → WebElementProtocol[source]
Find first element matching selector template (no waiting).
- Args:
selector_template: Either a Target or a (locator_type, value) tuple
-
assert_absent(selector_template: Target) → None[source]
-
element_absent(selector_template: Target) → bool[source]
-
switch_to_frame(frame_reference: str | int | WebElement = 'frame')[source]
Switch to an iframe or frame.
- Args:
- frame_reference: Can be:
-
- Returns:
The result of the switch operation
-
switch_to_default_content()[source]
Switch back to the default content (main page context).
This exits any iframe/frame context and returns to the top-level page.
-
get_cookies() → list[Cookie][source]
Get all cookies for the current domain.
- Returns:
List of cookie dictionaries with keys like ‘name’, ‘value’, ‘domain’, ‘path’, etc.
-
click(selector_template: Target)[source]
-
action_chains()[source]
-
drag_and_drop(source: WebElementProtocol, target: WebElementProtocol) → None[source]
Drag and drop from source element to target element.
Uses JavaScript-based drag and drop implementation for reliability.
- Args:
source: The element to drag
target: The element to drop onto
-
move_to_and_click(element: WebElementProtocol) → None[source]
Move to an element and click it using ActionChains.
This is useful when a simple click doesn’t work due to element positioning.
- Args:
element: The element to move to and click
-
hover(element: WebElement) → None[source]
Hover over an element (move mouse to element without clicking).
- Args:
element: The element to hover over
-
send_enter(element: WebElement | None = None)[source]
-
send_escape(element: WebElement | None = None)[source]
-
send_backspace(element: WebElement | None = None)[source]
-
aggressive_clear(element: WebElement) → None[source]
-
abstract property timeout_handler: Callable[[WaitTypeT | None], float]
Get timeout handler for application specific wait types.
-
wait(timeout=<object object>, wait_type: ~galaxy.selenium.has_driver_protocol.WaitTypeT | None = None, **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]
Return a context manager for accepting alerts.
For Selenium, the alert must exist before it can be accepted,
so we wait until the context exits to accept it.
- Usage:
- with driver.accept_alert():
driver.click_selector(“#button-that-shows-alert”)
# Alert is automatically accepted here
-
execute_script(script: str, *args)[source]
Execute JavaScript in the current browser context.
- Args:
script: JavaScript code to execute
*args: Optional arguments to pass to the script (accessible as arguments[0], arguments[1], etc.)
- Returns:
The return value of the script execution
-
set_local_storage(key: str, value: str | float) → None[source]
Set a value in the browser’s localStorage.
- Args:
key: The localStorage key
value: The value to store (will be JSON-stringified if not a string)
-
remove_local_storage(key: str) → None[source]
Remove a key from the browser’s localStorage.
- Args:
key: The localStorage key to remove
-
scroll_into_view(element: WebElement) → None[source]
Scroll an element into view using JavaScript.
- Args:
element: The element to scroll into view
-
set_element_value(element: WebElement, value: str) → None[source]
Set an element’s value property directly using JavaScript.
This is useful for contenteditable elements or when .clear() doesn’t work.
- Args:
element: The element to modify
value: The value to set
-
execute_script_click(element: WebElement) → None[source]
Click an element using JavaScript instead of Selenium’s native click.
This is useful when Selenium’s click is intercepted or the element is not clickable.
- Args:
element: The element to click
-
find_element_by_link_text(text: str, element: WebElement | None = None) → WebElementProtocol[source]
-
find_element_by_xpath(xpath: str, element: WebElement | None = None) → WebElementProtocol[source]
-
find_element_by_id(id: str, element: WebElement | None = None) → WebElementProtocol[source]
-
find_element_by_selector(selector: str, element: WebElement | None = None) → WebElementProtocol[source]
-
find_elements_by_selector(selector: str, element: WebElement | None = None) → list[WebElementProtocol][source]
Find multiple elements by CSS selector.
- Args:
selector: CSS selector string
element: Optional parent element to search within
- Returns:
List of WebElementProtocol elements
-
get_input_value(element: WebElementProtocol) → str[source]
Get the value of an input element.
This provides a unified interface for getting input values across both
Selenium and Playwright backends. For Selenium, this uses get_attribute(“value”).
- Args:
element: The input element to get the value from
- Returns:
The current value of the input element, or empty string if no value
-
select_by_value(selector_template: Target | tuple[str, str], value: str) → None[source]
Select an option from a <select> element by its value attribute.
- Args:
selector_template: Either a Target or a (locator_type, value) tuple for the select element
value: The value attribute of the option to select
-
axe_eval(context: str | None = None, write_to: str | None = None) → AxeResults[source]
-
save_screenshot(path: str) → None[source]
Save a screenshot to the specified path.
- Args:
path: File path where the screenshot should be saved
-
get_screenshot_as_png() → bytes[source]
Capture a screenshot and return it as PNG bytes.
- Returns:
PNG image data as bytes
-
close() → None[source]
Cleanup the current browser tab/page.
-
quit() → None[source]
Clean up and close the driver/browser.
This closes all windows/tabs and releases all system resources.
The driver cannot be used after calling this method.
-
double_click(element: WebElement) → None[source]
Double-click an element using ActionChains.
- Args:
element: The element to double-click
-
assert_absent_or_hidden_after_transitions(selector_template: Target, **kwds) → None[source]
Assert element is absent or hidden (convenience method for subclasses to override with retry logic).
This is a basic implementation that calls assert_absent_or_hidden.
Subclasses may decorate or override this method with retry logic for handling
transitions where elements may become stale.
- Args:
selector_template: Target selector for the element
**kwds: Additional keyword arguments
-
galaxy.selenium.has_driver.SeleniumTimeoutException
alias of TimeoutException
-
class galaxy.selenium.has_driver.TimeoutMessageMixin[source]
Bases: object
Mixin providing timeout message formatting for driver abstractions.
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.
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: NamedTuple
-
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 = ('ux_render', 1)
-
UX_TRANSITION = ('ux_transition', 5)
-
DATABASE_OPERATION = ('database_operation', 10)
-
JOB_COMPLETION = ('job_completion', 45)
-
GIE_SPAWN = ('gie_spawn', 30)
-
SHED_SEARCH = ('shed_search', 30)
-
REPO_INSTALL = ('repo_install', 60)
-
HISTORY_POLL = ('history_poll', 3)
-
galaxy.selenium.navigates_galaxy.galaxy_timeout_handler(timeout_multiplier: float = 1)[source]
-
class galaxy.selenium.navigates_galaxy.NullTourCallback[source]
Bases: object
-
handle_step(step, step_index: int)[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.retry_index_during_transitions()[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.ConfigTemplateParameter(form_element_type: Literal['string', 'boolean', 'integer'], name: str, value: Any)[source]
Bases: object
-
form_element_type: Literal['string', 'boolean', 'integer']
-
name: str
-
value: Any
-
__init__(form_element_type: Literal['string', 'boolean', 'integer'], name: str, value: Any) → None
-
class galaxy.selenium.navigates_galaxy.FileSourceInstance(template_id: str, name: str, description: Optional[str], parameters: list[galaxy.selenium.navigates_galaxy.ConfigTemplateParameter] = <factory>)[source]
Bases: object
-
template_id: str
-
name: str
-
description: str | None
-
parameters: list[ConfigTemplateParameter]
-
__init__(template_id: str, name: str, description: str | None, parameters: list[~galaxy.selenium.navigates_galaxy.ConfigTemplateParameter] = <factory>) → None
-
class galaxy.selenium.navigates_galaxy.ObjectStoreInstance(template_id: str, name: str, description: Optional[str], parameters: list[galaxy.selenium.navigates_galaxy.ConfigTemplateParameter] = <factory>)[source]
Bases: object
-
template_id: str
-
name: str
-
description: str | None
-
parameters: list[ConfigTemplateParameter]
-
__init__(template_id: str, name: str, description: str | None, parameters: list[~galaxy.selenium.navigates_galaxy.ConfigTemplateParameter] = <factory>) → None
-
class galaxy.selenium.navigates_galaxy.ColumnDefinition(name: str, description: str, type: Literal['Text', 'Integer', 'Element Identifier'] = 'Text', optional: bool = False, default_value: str | None = None)[source]
Bases: object
-
name: str
-
description: str
-
type: Literal['Text', 'Integer', 'Element Identifier'] = 'Text'
-
optional: bool = False
-
default_value: str | None = None
-
__init__(name: str, description: str, type: Literal['Text', 'Integer', 'Element Identifier'] = 'Text', optional: bool = False, default_value: str | None = None) → None
-
class galaxy.selenium.navigates_galaxy.NavigatesGalaxy[source]
Bases: HasDriverProxy[WaitType]
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.
-
property driver: WebDriver
Access the underlying Selenium WebDriver.
This property provides direct access to the Selenium driver when using
the Selenium backend. For Playwright backend, this raises NotImplementedError.
- Returns:
WebDriver: The Selenium WebDriver instance
- Raises:
NotImplementedError: If using Playwright backend
-
property page
Access the underlying Playwright Page.
This property provides direct access to the Playwright page when using
the Playwright backend. For Selenium backend, this raises NotImplementedError.
- Returns:
Page: The Playwright Page instance
- Raises:
NotImplementedError: If using Selenium backend
-
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.
-
home() → None[source]
Return to root Galaxy page and wait for some basic widgets to appear.
-
wait_for_masthead()[source]
-
go_to_workflow_landing(uuid: str, public: Literal['false', 'true'], client_secret: str | None)[source]
-
go_to_trs_search() → None[source]
-
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]
-
make_history_private()[source]
-
go_to_import_zip() → 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.
-
visualization_panel()[source]
Decorator to operate within the context of Galaxy’s visualization 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]
-
history_panel_wait_for_and_select(hids: list[int])[source]
Waits for uploads to pass through queued, running, ok. Not all the states are not guaranteed
depending on how fast the upload goes compared to the history polling updates, it might just
skip to the end for a really fast upload
-
get_grid_entry_names(selector)[source]
-
select_grid_operation(item_name, option_label)[source]
-
select_history_card_operation(card_name, action_selector, is_in_extra=False)[source]
-
edit_dataset_dbkey(dbkey_text)[source]
-
get_history_card(card_name)[source]
-
get_history_titles(n_expected_histories)[source]
-
select_grid_cell(grid_name, item_name, column_index=3)[source]
-
toggle_card_selection_in_list(list_selector, 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]
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
-
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]
-
collection_builder_pair_rows(row_forward: int, row_reverse: int)[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_uri(uri, wait=False)[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_add_input(item_name='data_input')[source]
-
workflow_editor_connect(source, sink, screenshot_partial=None)[source]
-
workflow_editor_source_sink_terminal_ids(source, sink)[source]
-
workflow_editor_set_license(license: str) → None[source]
-
workflow_editor_license_text() → str[source]
-
workflow_editor_add_tool_step(tool_id: str)[source]
-
workflow_editor_set_tool_vesrion(version: str, node: int | str | None = None) → None[source]
-
workflow_editor_set_node_label(label: str, node: int | str | None = None)[source]
-
workflow_editor_set_node_annotation(annotation: str, node: int | str | None = None)[source]
-
workflow_editor_ensure_tool_form_open(node: int | str | None = None)[source]
-
workflow_editor_click_option(option_label)[source]
-
workflow_editor_click_options()[source]
-
workflow_editor_click_run()[source]
-
workflow_editor_click_save()[source]
-
workflow_editor_search_for_workflow(name: str)[source]
-
workflow_editor_add_steps(name: str)[source]
-
workflow_editor_add_subworkflow(name: str)[source]
-
workflow_editor_enter_column_definitions(column_definitions: list[ColumnDefinition])[source]
-
workflow_editor_enter_column_definition(column_definition: ColumnDefinition, index: int)[source]
-
navigate_to_histories_page()[source]
-
navigate_to_saved_visualizations()[source]
-
navigate_to_histories_shared_with_me_page()[source]
-
navigate_to_user_preferences()[source]
-
navigate_to_invocations_grid()[source]
-
navigate_to_pages()[source]
-
navigate_to_published_workflows()[source]
-
navigate_to_published_histories()[source]
-
navigate_to_tools()[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_click_search()[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_search_for(search_term=None)[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(selector_to_move='#center')[source]
-
pages_index_table_elements()[source]
-
workflow_index_open()[source]
-
workflow_index_open_with_name(name: str)[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_click_search()[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_bookmark_by_name(name)[source]
-
workflow_index_name(workflow_index=0)[source]
-
select_dropdown_item(option_title)[source]
-
workflow_share_click()[source]
-
workflow_index_view_external_link(workflow_index=0)[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: str | None = None, clear_placeholder: bool = False, save_workflow: bool = True)[source]
-
workflow_editor_set_annotation(annotation: str)[source]
-
invocation_index_table_elements()[source]
-
open_toolbox()[source]
-
swap_to_tool_panel(panel_id: str) → None[source]
-
swap_to_tool_panel_edam_operations() → None[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]
-
select_history_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_activity_workflow()[source]
-
click_button_new_workflow()[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
-
histories_click_advanced_search()[source]
-
history_panel_add_tags(tags)[source]
-
history_panel_rename(new_name)[source]
-
history_panel_name_input()[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]
-
display_dataset(hid)[source]
-
show_dataset_details(hid)[source]
-
show_dataset_visualizations(hid)[source]
-
show_dataset_visualization(hid: int, visualization_id: str, screenshot_name: str | None = None)[source]
-
history_panel_item_view_dataset_details(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]
-
history_panel_build_list_auto()[source]
-
history_panel_build_list_advanced()[source]
-
history_panel_build_list_of_pairs()[source]
-
history_panel_build_list_of_paired_or_unpaireds()[source]
-
history_panel_build_list_of_lists()[source]
-
history_panel_build_list_advanced_and_select_builder(builder: str)[source]
-
history_panel_build_rule_builder_for_selection()[source]
-
list_wizard_click_cell_and_send_keys(column_identifier: str, row_index: int, text: str)[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: int, tour_callback)[source]
-
wait_for_and_click_selector(selector)[source]
-
wait_for_and_click(selector_template)[source]
Wait for element to be clickable and click it.
-
wait_for_and_double_click(selector_template)[source]
Wait for element to be clickable and double-click it.
-
set_history_annotation(annotation, clear_text=False)[source]
-
ensure_history_annotation_area_displayed()[source]
-
select_set_value(container_selector_or_elem, value, multiple=False, 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]
-
create_file_source_template(instance: FileSourceInstance) → str[source]
-
create_object_store_template(instance: ObjectStoreInstance) → str[source]
-
tutorial_mode_activate()[source]
-
mouse_drag(from_element: WebElementProtocol, to_element: WebElementProtocol | 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
galaxy.selenium.smart_components module
-
class galaxy.selenium.smart_components.SmartComponent(component, has_driver: HasDriverProtocol)[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: HasDriverProtocol)[source]
-
class galaxy.selenium.smart_components.SmartTarget(target, has_driver: HasDriverProtocol)[source]
Bases: object
Wrap a Target with driver aware methods.
-
__init__(target, has_driver: HasDriverProtocol)[source]
-
all()[source]
-
wait_for_element_count_of_at_least(n: int, **kwds)[source]
-
wait_for_and_click(**kwds)[source]
-
wait_for_and_double_click(**kwds)[source]
-
wait_for_visible(**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_send_enter()[source]
-
wait_for_and_clear_and_send_keys(*text)[source]
-
wait_for_and_clear_aggressive_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]