Desktop Pages

As the desktop for LiveObs uses Odoo’s webclient there are a number of common page objects that can be interactive. These are the top and left navigations, the search box and the view switch buttons.

class liveobs_ui.page_object_models.desktop.desktop_common.BaseDesktopPage(driver)[source]

Base class to initialise the base page that will be called from all pages

change_to_form_view()[source]

Change the Form view mode

change_to_kanban_view()[source]

Change the Kanban view mode

change_to_list_view()[source]

Change the list view mode

change_view_mode(view_mode)[source]

Click the supplied view_mode button

Parameters:view_mode – View mode to select
click_breadcrumb(breadcrumb)[source]

Click on the supplied breadcrumb and verify that it is no longer on the page

Parameters:breadcrumb – Breadcrumb element to click
close_search_options_draw()[source]

Close the search options draw on the current page

get_breadcrumbs()[source]

Get the breadcrumbs that allow to go back up a page in the navigation

Returns:list of breadcrumb elements
static get_menu_item_text(menu_item)[source]

Returns the text attribute of an element on an item in the left menu section on the desktop app

Parameters:menu_item – WebElement from where to get the text element
Returns:The text within the WebElement
Return type:unicode
get_menu_items_list()[source]

Returns a list of all the items in the left menu section on the desktop app

Returns:A list of all the WebElement items
Return type:List of WebElements
go_to_next_record_in_list()[source]

Click the next record button in the list of records. This is shown on the form view

go_to_page(page_title)[source]

Go to the supplied page in the left hand menu based on the title of the page

Parameters:page_title – Title of the page to go to
go_to_previous_page()[source]

Go back to the page used to get to the patient record in the breadcrumbs

go_to_previous_record_in_list()[source]

Click the previous record button in the list of records. This is shown on the form view

open_search_options_draw()[source]

Open the search options draw on the current page

Using the searchview conduct a search with the supplied search query

Parameters:
  • search_query – Query to input into the search box
  • search_type – Type of search (uses Odoo Search autocomplete)
select_filter(filter_name)[source]

Open up the search options draw and select a filter based on filter name

Parameters:filter_name – Name of the filter to select
select_group_by(group_by_name)[source]

Open the search options draw and select a group by based on the supplied name

Parameters:group_by_name – Name of the group by option to select