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: ArgumentParser) → ArgumentParser[source]

Add common selenium arguments for argparse driver utility.

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

Bases: NavigatesGalaxy

Adapt argparse command-line options to a browser automation driver.

__init__(args: Namespace) → None[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

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

refresh() → None[source]

Reload the current page.

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:
  • str: frame name or id (will wait for frame to be available)

  • int: frame index

  • WebElement: frame element

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.

visit_new_window()[source]

Focus the window or tab the page just opened, closing it on exit.

See HasDriverProtocol.visit_new_window.

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

drag_over(source: WebElementProtocol, target: WebElementProtocol)[source]

Hold a drag of source over target, dropping on exit.

A real pointer drag rather than the scripted one drag_and_drop uses: the point is to hand control back to the test mid-drag, which a single scripted sequence cannot do.

See HasDriverProtocol.drag_over.

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

active_element() → WebElement[source]
press(*keys: Key | str, modifiers: Sequence[Key] = (), element: WebElement | None = None) → None[source]
hover_away() → None[source]

Move the mouse off whatever element it is currently over.

Used to dismiss hover-triggered UI such as tooltips.

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, Vue/JS framework inputs that need event dispatch, or when .clear() doesn’t work.

The value is passed via arguments[1] (not interpolated into the JS string) so that values containing quotes or other special characters are handled correctly. Both input and change events are dispatched so that reactive frameworks (e.g. Vue) detect the change.

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_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

select_by_visible_text(selector_template: Target | tuple[str, str], text: str) → None[source]

Select an option from a <select> element by the text shown to the user.

Args:

selector_template: Either a Target or a (locator_type, value) tuple for the select element text: The visible text 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

highlight_element(element: WebElementProtocol) → AbstractContextManager[None][source]

Return a context manager that draws a red border around an element.

Args:

element: The element to highlight

Returns:

Context manager restoring the previous border on exit

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

fire_mousedown(element: WebElement) → None[source]

Dispatch a mousedown event on an element via JS.

Fires exactly one mousedown event. Useful for elements that listen for mousedown rather than 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

galaxy.selenium.navigates_galaxy.css_attribute_value(value: str) → str[source]

Escape value for use inside a single-quoted CSS attribute selector.

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.FormField(name, label, value)[source]

Bases: NamedTuple

name: str

Alias for field number 0

label: str

Alias for field number 1

value: 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)
UX_POPUP = ('ux_popup', 15)
DATABASE_OPERATION = ('database_operation', 10)
JOB_COMPLETION = ('job_completion', 45)
GIE_SPAWN = ('gie_spawn', 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.TourCallbackProtocol(*args, **kwargs)[source]

Bases: Protocol

handle_step(step: dict[str, Any], step_index: int, element: WebElementProtocol | None = None) → None[source]

Handle a tour step once it has been reached.

element is the step’s target, or None for a step that names neither an element selector nor a component.

__init__(*args, **kwargs)
class galaxy.selenium.navigates_galaxy.NullTourCallback(*args, **kwargs)[source]

Bases: TourCallbackProtocol

handle_step(step: dict[str, Any], step_index: int, element: WebElementProtocol | None = None) → None[source]

Handle a tour step once it has been reached.

element is the step’s target, or None for a step that names neither an element selector nor a component.

galaxy.selenium.navigates_galaxy.exception_seems_to_indicate_transition(e: Exception) → bool[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 kinds of exceptions that we say may indicate a transition are StaleElement exceptions (a DOM element grabbed at one step is no longer available), “not clickable” exceptions (so perhaps a popup modal is blocking a click), and Playwright TimeoutErrors (element not yet present/visible during a transition).

galaxy.selenium.navigates_galaxy.retry_call_during_transitions(f: ~collections.abc.Callable[[], ~galaxy.selenium.navigates_galaxy.T], attempts: int = 10, sleep: float = 0.1, exception_check: ~collections.abc.Callable[[Exception], bool] = <function exception_seems_to_indicate_transition>) → T[source]
galaxy.selenium.navigates_galaxy.retry_during_transitions(f: ~collections.abc.Callable[[~P], ~galaxy.selenium.navigates_galaxy.T], attempts: int = 10, sleep: float = 0.1, exception_check: ~collections.abc.Callable[[Exception], bool] = <function exception_seems_to_indicate_transition>) → Callable[[P], T][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: str | None, 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: str | None, 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_tool_landing(uuid: str, public: Literal['false', 'true'] = 'true', client_secret: str | None = None)[source]
go_to_trs_by_id() → None[source]
go_to_trs_by_url() → None[source]
go_to_workflow_sharing(workflow_id: str) → None[source]
go_to_workflow_export(workflow_id: str) → None[source]
go_to_page_sharing(page_id: str) → None[source]
go_to_history_sharing(history_id: str) → None[source]
go_to_collection_sheet(collection_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.

capture_clipboard() → Iterator[ClipboardCapture][source]

Record text the page copies to the clipboard for the scope of the context.

Usage:
with self.capture_clipboard() as clipboard:

copy_button.wait_for_and_click() assert clipboard.wait_for_text() == expected_text

in_frame(frame_reference: str | int | Any = 'frame')[source]

Context manager to operate within the context of an iframe.

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]
history_collection_names(history_id: str) → list[str][source]

Names of the collections in history_id.

current_history() → dict[str, Any][source]
current_history_id() → str[source]
wait_for_current_history_id(history_id: str)[source]

Wait until history_id is the user’s current history.

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_switch_to(history_id: str)[source]

Make history_id current via the history panel’s Switch to history modal.

history_panel_create_new()[source]

Click create new and wait for the new history to become the current one.

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]
history_wait_for_new_collection(after_hid: int) → dict[str, Any][source]

Wait for a collection with a hid above after_hid in the current history; return the newest.

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_hid_datatype(hid: int, datatype: str)[source]
history_panel_wait_for_hid_dbkey(hid: int, dbkey: str)[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]
edit_dataset_attribute_fields() → list[FormField][source]

On the dataset edit view, return the Attributes tab’s visible fields.

edit_dataset_permission_roles() → dict[str, list[str]][source]

On the dataset edit view, open the Permissions tab; return its manage and access role names.

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]
histories_purge_all()[source]

Purge every listed history: Histories > Select all > Purge (N) > Purge histories.

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]
request_password_reset(email: str) → str[source]

Request a reset email via the login page’s reset link and return its confirmation.

Open the emailed reset link and save the new password.

change_password(password: str, current_password: str | None = None) → None[source]

Save a new password from the reset or expired-password form.

register(email=None, password=None, username=None, confirm=None, assert_valid=True, via_masthead=False)[source]

Register a user from the login page’s “Register here” form, or the masthead’s Register button.

wait_for_logged_in()[source]
click_center()[source]
hover_over(target)[source]
collection_builder_pair_rows(row_forward: int, row_reverse: int)[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_show_and_get_source(screenshot_name: str | None = None) → str[source]
rule_builder_show_and_get_source_as_json() → dict[source]
rule_builder_column_values(column_index: int) → list[str][source]

Text of each rendered cell in a rule builder column, in row order.

The grid only renders cells in view, so this moves keyboard focus to the column to scroll it in. Rows are not scrolled, so this suits small tables.

rule_builder_enter_source_text(json)[source]
workflow_editor_add_input(item_name='data_input')[source]
workflow_editor_connect(source: str | tuple[int | str, str], sink: str | tuple[int | str, str], screenshot_partial: str | None = None)[source]
workflow_editor_try_connect(source: str | tuple[int | str, str], sink: str | tuple[int | str, str], screenshot_partial: str | None = None) → str | None[source]

Drag source onto sink; return the editor’s reason for refusing the drop, or None if it accepted.

workflow_editor_remove_node(node_ref: int | str)[source]
workflow_editor_node(node_ref: int | str) → SmartTarget[source]
workflow_editor_node_and_terminal(terminal: str | tuple[int | str, str]) → tuple[SmartTarget, str][source]

Resolve a label#terminal or (node, terminal) reference to a node component and terminal name.

workflow_editor_source_sink_terminal_ids(source: str | tuple[int | str, str], sink: str | tuple[int | str, str]) → tuple[str, str][source]
workflow_editor_source_sink_terminal_elements(source: str | tuple[int | str, str], sink: str | tuple[int | str, str]) → tuple[WebElementProtocol, WebElementProtocol][source]
workflow_editor_destroy_connection(sink: str | tuple[int | str, str])[source]
workflow_editor_assert_connected(source: str | tuple[int | str, str], sink: str | tuple[int | str, str])[source]
workflow_editor_assert_connection_invalid(source: str | tuple[int | str, str], sink: str | tuple[int | str, str])[source]
workflow_editor_assert_not_connected(source: str | tuple[int | str, str], sink: str | tuple[int | str, str])[source]
workflow_editor_assert_input_mapped(sink: str | tuple[int | str, str])[source]
workflow_editor_assert_input_not_mapped(sink: str | tuple[int | str, str])[source]
workflow_editor_set_license(license: str) → None[source]
workflow_editor_change_output_datatype(output: str, datatype: str) → None[source]

Pick datatype in the “Change datatype” multiselect of the output card for output.

Typing into the search box re-filters the option list asynchronously and vue-multiselect keys its option elements by index, so an option located before the filtered list is rendered stays attached but ends up bound to whichever datatype occupies that index afterwards. Only click once every option that does not match the search text is gone, then check what the control reports as selected.

workflow_editor_license_text() → str[source]
workflow_editor_set_collection_type(collection_type: str | None, custom: bool = False) → None[source]

Set the open collection input’s type - None for any type, custom to type it in.

workflow_editor_wait_for_collection_type_selected(collection_type: str | None, custom: bool = False) → None[source]

Wait for the collection type select to show collection_type (see workflow_editor_set_collection_type).

workflow_editor_add_tool_step(tool_id: str)[source]
workflow_editor_set_tool_version(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_options_menu_element()[source]
workflow_editor_click_run()[source]

Open the run form from the editor’s Run activity.

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_storage_dashboard()[source]
storage_dashboard_cleanup(operation: str, screenshot_prefix: str | None = None)[source]

Storage Dashboard > Free up disk space: review an operation’s items, select all, permanently delete.

operation is a cleanup id: deleted_datasets, deleted_histories or archived_histories.

storage_dashboard_recalculate_disk_usage()[source]

Open the Storage Dashboard from the masthead usage meter and click Refresh (recalculate disk usage).

navigate_to_saved_visualizations()[source]
navigate_to_histories_shared_with_me_page()[source]
navigate_to_manage_information()[source]

Open Preferences > Manage Information.

manage_information_save(email: str | None = None, username: str | None = None)[source]

Change the email and/or public name on Preferences > Manage Information and Save.

navigate_to_user_preferences()[source]
user_preferences_new_datasets_private() → bool[source]

Open Preferences > Set Dataset Permissions for New Histories; return its Make new datasets private switch.

user_preferences_set_new_datasets_private(private: bool)[source]

Set Preferences > Set Dataset Permissions for New Histories’ Make new datasets private switch.

navigate_to_invocations_grid()[source]
navigate_to_galaxyai()[source]
galaxyai_ensure_new_chat()[source]

Ensure GalaxyAI center panel shows an empty conversation.

galaxyai_send_message(text)[source]

Type a message, click send, and wait for the response to appear.

navigate_to_dataset_error(hid)[source]

Display a dataset and click the error tab.

galaxy_wizard_analyze()[source]

Click the wizard analyze button and wait for the response.

navigate_to_pages()[source]
navigate_to_published_workflows()[source]
navigate_to_curated_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]
quota_form_add_user(email: str)[source]
quota_form_add_group(name: str)[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_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]
libraries_folder_wait_for_datasets(names) → list[str][source]

Wait until the open library folder lists names; returns every row’s name in display order.

libraries_folder_select_datasets(names)[source]

Tick the open library folder’s datasets named names.

libraries_folder_add_to_history(names, history_id=None, screenshot_name=None)[source]

Add the open folder’s datasets names via Add to History > as Datasets, into history_id if given.

navigate_to_new_library()[source]
wait_for_fade_in(target)[source]

Wait until target is visible and has finished fading in to full opacity.

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]
navigate_to_workflows_import()[source]
workflow_index_open_with_name(name: str)[source]

Open the workflow titled name (else the only one whose title contains it) in the editor.

workflow_shared_with_me_open()[source]
workflow_card_elements()[source]
curated_workflow_card_titles() → list[str][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: str)[source]

Delete the workflow titled name (else the only one whose title contains it).

workflow_bookmark_by_name(name: str)[source]

Bookmark the workflow titled name (else the only one whose title contains it).

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_id(workflow_id: str)[source]
workflow_run_with_name(name: str)[source]

Open the run form of the workflow titled name (else the only one whose title contains it).

workflow_run_specify_inputs(inputs: dict[str, Any])[source]

Select a dataset or collection by hid for each input label, in the simplified or expanded run form.

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]
workflow_editor_open_best_practices()[source]

Open the editor’s Best Practices panel unless already open.

workflow_editor_best_practices() → dict[str, str][source]

Open the editor’s Best Practices panel; return each check’s status (ok/warning) by name.

workflow_editor_add_tags(tags: list[str])[source]

Add tags from the editor’s Attributes panel (Tags > Add Tags); the editor saves tags at once.

invocation_index_table_elements()[source]
invocation_open_latest()[source]

Open the most recent invocation from the invocations panel, then close the panel.

open_toolbox() → None[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, multiple=False)[source]
tool_form_select_collection(expanded_parameter_id, name)[source]
form_field(parameter: str) → WebElementProtocol[source]

Wait for and return form element parameter’s .ui-form-field.

static form_field_kind(field: WebElementProtocol) → str[source]

Widget kind of a .ui-form-field: boolean, color, drill_down, checkboxes, radio, select or text.

form_field_value(field: WebElementProtocol) → str[source]

Value of a .ui-form-field as form_element_set_value takes it; lists joined by ``, ``.

form_element_value(parameter: str) → str[source]

Value of form element parameter, see form_field_value.

form_element_set_value(parameter: str, value)[source]

Set form element parameter; checkboxes and drill-downs take a value or list of values.

tool_form_generate_tour()[source]
tool_form_execute()[source]
tool_form_set_switch(parameter: str, value: bool = True) → None[source]

Set a switch on the open tool form by clicking it as a user would.

tool_form_set_use_cached_job(value: bool = True) → None[source]

Set the open tool form’s “Attempt to re-use jobs with identical parameters?” switch.

tool_form_select_data(parameter: str, value: str, multiple: bool = False)[source]
tool_form_accepted_formats(parameter: str) → list[str][source]

Open data parameter’s accepted formats list; return the datatypes it shows.

tool_form_wait_for_batch_info(parameter: str, text: str) → str[source]
click_activity_workflow()[source]
click_button_new_workflow()[source]
navigate_to_page_editor(page_id)[source]

Navigate to the unified editor for a standalone page.

navigate_to_history_pages()[source]

Navigate to the page list for the current history.

history_panel_click_edit_current_page()[source]

Click page icon — waits for editor toolbar (non-WM path).

history_panel_click_view_current_page()[source]

Click page icon — waits for WinBox window (WM-active path).

history_page_create(screenshot_name=None)[source]

Click the create button on the page list. Returns to editor view.

history_page_editor_set_content(content)[source]

Type content into the markdown editor textarea.

history_page_save()[source]

Click the save button and wait for save to complete.

history_page_manage()[source]

Click back button to return to page list.

history_page_assert_item_count(n)[source]

Assert the page list shows exactly n items.

history_page_open_revisions()[source]

Click Revisions button in page toolbar.

history_page_assert_revision_count(n)[source]

Assert the revision list shows exactly n items.

history_page_rename(page_type: str, new_name: str)[source]

Rename page via RenameModal in toolbar.

rename_modal_rename(item_type: str, new_name: str)[source]

Rename via RenameModal: opens the rename modal, types new name, and submits.

navigate_to_history_page_editor(history_id, page_id)[source]

Open an existing history-attached page (notebook) in the editor (history mode).

notebook_click_extract_workflow()[source]

Click the notebook editor’s Extract Workflow toolbar action, wait for the form.

history_page_open_chat()[source]

Click chat button in page toolbar, wait for chat panel visible.

click_history_options()[source]
click_history_option_export_to_file()[source]
click_history_option_sharing()[source]
click_history_option_resume_paused_jobs()[source]

Open History options > Resume Paused Jobs.

click_history_option_tool_references()[source]

Open History options > Export Tool References and wait for the references.

navigate_to_history_view(history_id)[source]

Open the history view page of history history_id.

history_view_import(new_name=None)[source]

Import the open history view’s history: Import this history > Copy History.

click_history_option_extract_workflow()[source]
navigate_to_workflow_extraction()[source]

Navigate to workflow extraction UI via history options menu.

extract_workflow_set_name(name: str)[source]

Set the workflow name in the extraction form.

extract_workflow_submit()[source]

Submit the extraction form.

extract_workflow_name_and_submit(name: str)[source]

Set the workflow name and submit the extraction form.

click_history_option(option_label_or_component)[source]
platform_modifier_key() → Key[source]

Return the modifier the client binds shortcuts to on this browser’s platform.

The browser decides this, not the machine running the tests, so the check is the one behind eventStore.isMac.

command_palette_open() → None[source]

Open the command palette from the masthead search button.

command_palette_toggle_with_shortcut() → None[source]

Send ctrl/cmd + k, the palette’s global shortcut, to whatever has focus.

The palette component owns the shortcut listener and mounts only once the client has loaded the configuration, which can land after the masthead is up. Its <dialog> is in the DOM whenever the component is mounted, so waiting for it means the key press has a listener to reach.

command_palette_wait_for_open() → None[source]
command_palette_wait_for_closed() → None[source]
command_palette_type(text: str) → None[source]

Append to the palette input a character at a time, the way a user types.

Tokens are parsed as they arrive, so h: leaves the input empty behind a scope badge and whatever follows is a query inside that scope.

command_palette_badge_text() → str[source]

Text of the scope or action badge in front of the input.

command_palette_option_titles() → list[str][source]

Titles of the rendered result rows, in the order they are shown.

The rows are replaced on every search, so the read is retried rather than left to raise out of whatever wait is polling it.

command_palette_wait_for_input_value(value: str) → None[source]

Wait for the palette input to hold exactly this text.

command_palette_wait_for_option(title: str) → None[source]

Wait for a result row with this exact title.

Searches are debounced and most of them reach the API, so this waits longer than a render.

command_palette_click_option(title: str) → None[source]

Run the result row with this title; the click bubbles from the title to the row.

command_palette_click_category(category_id: str) → None[source]

Narrow the current root query to one category tab of the category row.

window_manager_toggle()[source]

Click the window manager toggle button and wait for state change.

window_manager_enable()[source]

Enable the window manager (if not already active).

window_manager_disable()[source]

Disable the window manager (if currently active).

window_manager_active()[source]

Context manager: enable WM on entry, disable on exit.

window_manager_is_active() → bool[source]

Check if the window manager is currently enabled via the masthead toggle class.

window_manager_window_count() → int[source]

Return number of open window manager windows.

window_manager_wait_for_window_count(expected_count: int)[source]

Wait until the expected number of window manager windows exist.

window_manager_wait_for_window_count_at_least(minimum: int)[source]

Wait until at least minimum window manager windows exist.

window_manager_frame(index=0)[source]

Context manager to switch into a window manager iframe by index.

Usage:
with self.window_manager_frame(0):

self.wait_for_selector_visible(“.dataset-view”)

window_manager_get_titles() → list[source]

Return list of window titles from all open window manager windows.

window_manager_close_window(index=0)[source]

Close a specific window manager window by index.

window_manager_get_focused_title() → str[source]

Return the title text of the currently focused window manager window.

window_manager_click_focus_overlay(index=0)[source]

Click the focus overlay of a window manager window to switch focus.

Uses fire_mousedown to match the event the overlay actually listens for.

window_manager_get_iframe_src(index=0) → str[source]

Return the src attribute of a window manager iframe by index.

window_manager_focused_count() → int[source]

Return the number of focused window manager windows.

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, scope='.history-index')[source]

uses bootstrap dropdown by data-description attributes

history_panel_add_tags(tags)[source]
tags_add_from_button(tag_area_button, tag_area_input, tags)[source]

Open a tag editor with tag_area_button and enter each tag in tags.

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, history_id=None)[source]
history_panel_change_selected(operation: str, value: str)[source]

Apply value to the selected history items through a Selection menu modal.

operation is the menu item’s data-description, e.g. “change data type” (needs Celery).

history_panel_multi_operation_action_click(action)[source]
history_panel_confirm_selected_operation(option: str) → None[source]

Pick option (e.g. “hide option”) from the Selection menu and confirm it.

history_panel_delete_selected(purge: bool = False)[source]

Delete the selected history items from the Selection menu, permanently with purge, and confirm.

history_panel_undelete_selected() → None[source]

Undelete the selected history items from the Selection menu and confirm.

history_panel_hide_selected(unhide: bool = False) → None[source]

Hide (or unhide) the selected history items from the Selection menu and confirm.

history_panel_item_delete(hid)[source]

Delete history item hid with its trash button.

history_panel_item_undelete(hid)[source]

Undelete history item hid with its Undelete button; deleted items must be shown.

history_panel_include_deleted()[source]

Toggle the history panel’s Include deleted filter (the deleted-items counter).

history_panel_item_unhide(hid)[source]

Unhide history item hid with its Unhide button; hidden items must be shown.

history_panel_include_hidden()[source]

Toggle the history panel’s Include hidden filter (the hidden-items counter).

history_panel_filter(text: str) → None[source]

Replace the history panel’s filter text with text, e.g. deleted:true.

open_history_multi_view()[source]
multi_history_copy_item(hid: int, from_history_id: str, to_history_id: str)[source]

In Multiview, copy item hid by dragging it from one history’s column onto another’s.

history_multi_view_display_collection_contents(collection_hid, collection_type='list')[source]
history_panel_item_edit(hid)[source]
history_panel_collection_edit(hid: int)[source]

Open collection hid’s Edit Collection Attributes view (its pencil).

collection_edit_change_datatype(current: str, new: str)[source]

On the collection edit view’s Datatypes tab, change every element from current to new.

collection_edit_convert(converter: str)[source]

On the collection edit view’s Convert tab, run the converter named converter on every element.

display_dataset(hid)[source]
show_dataset_details(hid)[source]
show_dataset_visualizations(hid)[source]
dataset_display_applications(hid: int) → list[tuple[str, list[str]]][source]

Open dataset hid’s Visualize tab; return (label, link texts) per display application, in page order.

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_click_visualization_menu(hid)[source]
history_panel_item_available_visualizations_elements(hid)[source]
history_panel_item_get_tags(hid)[source]
history_panel_item_add_tags(hid, tags)[source]

Expand dataset hid and add each tag in tags from its Add Tags button.

history_panel_item_available_visualizations(hid)[source]
history_panel_item_click_visualization(hid, visualization_name)[source]
history_panel_item_selector(hid, wait=False, history_id=None)[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(scope='.history-index')[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(screenshot_name: str | None = None)[source]
history_panel_build_list_advanced_and_select_builder(builder: str, screenshot_name: str | None = None)[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]
ag_grid_edit_cell(grid: SmartComponent, column_identifier: str, row_index: int, text: str, clear: bool = False)[source]

Edit a cell of grid, a component with cell and cell_input selectors.

collection_builder_set_name(name)[source]
collection_builder_hide_originals()[source]
collection_builder_toggle_remove_extensions() → None[source]

Flip the builder’s “Remove file extensions?” switch (on by default).

collection_builder_rename_element(hid: int, name: str)[source]

Rename list element hid in the flat list builder (click its name, type, enter).

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: str, skip_steps: list[str] | None = None, sleep_on_steps: dict[str, int | float] | None = None, tour_callback: TourCallbackProtocol | None = None) → 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_template: Target, **kwds: Any) → None[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: dict[str, Any], step_index: int, tour_callback: TourCallbackProtocol) → None[source]
wait_for_and_click_selector(selector)[source]
wait_for_and_click(selector_template: Target, **kwds: Any) → Any[source]

Wait for element to be clickable and click it.

wait_for_and_double_click(selector_template: Target, **kwds: Any) → Any[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, confirm_permissions_change=False)[source]
create_file_source_template(instance: FileSourceInstance) → str[source]
create_object_store_template(instance: ObjectStoreInstance) → str[source]
tutorial_mode_activate()[source]
shift_click(element: WebElementProtocol) → None[source]

Shift-click an element. Works with both Selenium and Playwright.

set_file_input(file_input: WebElementProtocol, test_path: str) → None[source]

Attach a local file to a file input element, visible or not.

Playwright types into an element rather than setting its value, so a file input there has to go through set_input_files.

send_keys_to_page(*value: str) → None[source]

Send keys to the currently focused element / page.

Replaces action_chains().send_keys(…).perform() with a backend-agnostic impl. Accepts Selenium Keys constants and plain text, matching PlaywrightElement.send_keys semantics.

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]
select_by_value(value: str)[source]

Select an option from a <select> element by its value attribute.

select_by_visible_text(text: str)[source]

Select an option from a <select> element by the text shown to the user.

axe_eval() → AxeResults[source]
assert_no_axe_violations_with_impact_of_at_least(impact: Literal['minor', 'moderate', 'serious', 'critical'], excludes: list[str] | None = None) → None[source]