List Page

The list page is a base class for the task and patient list as these use the same template to render their respective lists.

This class handles selecting items in the list as well as verifying the text in the list items.

Class Methods:

class liveobs_ui.page_object_models.mobile.list_page.ListPage(driver)[source]

Class that handles generic list page functionality

get_list_item(text_to_find)[source]

Get a specific item from the list

Parameters:text_to_find (str) – Text that should be in the list item to be found
Returns:The list item if found or None
get_list_items()[source]

Get a list of the items in the task / patient list

Returns:A list of a tags from the list
Return type:list
static get_patient_from_item(list_item)[source]

Get the patient’s name from list item

Parameters:list_item – WebElement for List Item
Returns:name of patient the list item is about
static get_task_info_from_item(list_item)[source]

Get the .taskInfo element from the list item

Parameters:list_item – WebElement for List Item
Returns:text inside .taskInfo element of List Item
open_item(list_item)[source]

Open (click on) the supplied list item and ensure that the page has been successfully loaded

Parameters:list_item – List Item to click on
Returns:True if successfully opened item, False if not
select_random_patient()[source]

Finds a random patient in the patient list and selects it

Returns:selects and opens patient