Common Modal View Interactions

There are a number of common interaction patterns with modals such as closing them or clicking the buttons at the bottom of the modal.

class liveobs_ui.page_object_models.desktop.modal_view_common.BaseModalPage(driver)[source]

Common interaction patterns with modal dialogs

click_modal_button_by_name(modal, name)[source]

Click a button in modal’s footer with a specified name

Parameters:
  • modal – Modal to click button in
  • name – Name of button to click
close_modal(modal)[source]

Close the supplied modal

Parameters:modal – Modal to close
get_currently_open_modal()[source]

Get the currently open modal on the screen

Returns:Modal element
get_modal_button_by_name(modal, name)[source]

Get a button in the modal’s footer with a specified name

Parameters:
  • modal – Modal to find button in
  • name – Name of button
Returns:

button element

static get_modal_buttons(modal)[source]

Get the buttons in the supplied modal’s footer

Parameters:modal – Modal to get buttons for
Returns:list of button elements
static get_modal_title(modal)[source]

Get the title of the supplied modal

Parameters:modal – Modal to get title for
Returns:Title for supplied modal
Return type:str