{"body": "
\n

# ubuntuuitoolkit Package\u00b6

\n
\n

## `custom proxy object` Module\u00b6

\n

Ubuntu UI Toolkit Autopilot tests and helpers.

\n

\n
\nclass `ubuntuuitoolkit.``AppHeader`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  AppHeader Autopilot custom proxy object.

  \n
  \n
  \n`click_action_button`(action_object_name)\u00b6
  \n

    Click an action button of the header.

    \n

    \n\n\n
    \n
    Parameters: | object_name – The QML objectName property of the action\n
    \n
    Raises ToolkitException:
    \n
    | If there is no action button with that object\nname.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`click_back_button`()\u00b6
  \n
  \n\n
  \n
  \n`click_custom_back_button`()\u00b6
  \n
  \n\n
  \n
  \n`ensure_visible`()\u00b6
  \n
  \n\n
  \n
  \n`get_selected_section_index`()\u00b6
  \n
  \n\n
  \n
  \n`switch_to_next_tab`(instance, *args, **kwargs)\u00b6
  \n

    Open the next tab.

    \n

    \n\n\n
    \n
    Raises ToolkitException:
    \n
    | If the main view has no tabs.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`switch_to_section_by_index`(instance, *args, **kwargs)\u00b6
  \n

    Select a section in the header divider

    \n

    \n\n\n
    \n
    Parameters: | index – The index of the section to select\n
    \n
    Raises ToolkitEmulatorException:
    \n
    | If the selection index is out of\nrange or useDeprecatedToolbar is set.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`switch_to_tab_by_index`(instance, *args, **kwargs)\u00b6
  \n

    Open a tab. This only supports the new tabs in the header

    \n

    \n\n\n
    \n
    Parameters: | index – The index of the tab to open.\n
    \n
    Raises ToolkitException:
    \n
    | If the tab index is out\nof range or useDeprecatedToolbar is set.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`wait_for_animation`()\u00b6
  \n
  \n\n

\n\n

\n
\n`ubuntuuitoolkit.``check_autopilot_version`()\u00b6
\n

  Check that the Autopilot installed version matches the one required.

  \n

  \n\n\n
  \n
  Raises ToolkitException:
  \n
  | If the installed Autopilot version does’t\nmatch the required by the custom proxy objects.\n
  \n
  \n

  \n

\n\n

\n
\nclass `ubuntuuitoolkit.``CheckBox`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  CheckBox Autopilot custom proxy object.

  \n
  \n
  \n`change_state`(instance, *args, **kwargs)\u00b6
  \n

    Change the state of a CheckBox.

    \n

    If it is checked, it will be unchecked. If it is unchecked, it will be\nchecked.

    \n

    \n\n\n
    \n
    Parameters: | time_out – number of seconds to wait for the CheckBox state\nto change. Default is 10.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`check`(instance, *args, **kwargs)\u00b6
  \n

    Check a CheckBox, if its not already checked.

    \n

    \n\n\n
    \n
    Parameters: | timeout – number of seconds to wait for the CheckBox to be\nchecked. Default is 10.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`uncheck`(instance, *args, **kwargs)\u00b6
  \n

    Uncheck a CheckBox, if its not already unchecked.

    \n

    \n\n\n
    \n
    Parameters: | timeout – number of seconds to wait for the CheckBox to be\nunchecked. Default is 10.\n
    \n
    \n

    \n
  \n\n

\n\n

\n
\n`ubuntuuitoolkit.``get_keyboard`()\u00b6
\n

  Return the keyboard device.

  \n

\n\n

\n
\n`ubuntuuitoolkit.``get_pointing_device`()\u00b6
\n

  Return the pointing device depending on the platform.

  \n

  If the platform is Desktop, the pointing device will be a Mouse.\nIf not, the pointing device will be Touch.

  \n

\n\n

\n
\nclass `ubuntuuitoolkit.``Header`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._header.AppHeader`

  \n

  Autopilot helper for the deprecated Header.

  \n

\n\n

\n
\nclass `ubuntuuitoolkit.``Dialog`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  Autopilot helper for the Dialog component.

  \n

\n\n

\n
\nclass `ubuntuuitoolkit.``UCListItem`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  Base class to emulate swipe for leading and trailing actions.

  \n
  \n
  \n`toggle_selected`(instance, *args, **kwargs)\u00b6
  \n

    Toggles selected state of the ListItem.

    \n
  \n\n
  \n
  \n`trigger_leading_action`(instance, *args, **kwargs)\u00b6
  \n

    Swipe the item in from left to right to open leading actions\nand click on the button representing the requested action.

    \n
    \n
    parameters: action_objectName - object name of the action to be
    \n
      triggered.\nwait_function - a custom wait function to wait till the\naction is triggered
    \n
    \n
  \n\n
  \n
  \n`trigger_trailing_action`(instance, *args, **kwargs)\u00b6
  \n

    Swipe the item in from right to left to open trailing actions\nand click on the button representing the requested action.

    \n
    \n
    parameters: action_objectName - object name of the action to be
    \n
      triggered.\nwait_function - a custom wait function to wait till the\naction is triggered
    \n
    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``MainView`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  MainView Autopilot custom proxy object.

  \n
  \n
  \n`click_action_button`(instance, *args, **kwargs)\u00b6
  \n

    Click the specified button.

    \n

    \n\n\n
    \n
    Parameters: | action_object_name – the objectName of the action to trigger.\n
    \n
    Raises ToolkitException:
    \n
    | The requested button is not available.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`close_toolbar`(instance, *args, **kwargs)\u00b6
  \n

    Close the toolbar if it is opened.

    \n

    \n\n\n
    \n
    Raises ToolkitException:
    \n
    | If the main view has no toolbar.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`get_action_selection_popover`(object_name)\u00b6
  \n

    Return an ActionSelectionPopover custom proxy object.

    \n

    \n\n\n
    \n
    Parameters: | object_name – The QML objectName property of the popover.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`get_header`()\u00b6
  \n

    Return the AppHeader custom proxy object of the MainView.

    \n
  \n\n
  \n
  \n`get_tabs`()\u00b6
  \n

    Return the Tabs custom proxy object of the MainView.

    \n

    \n\n\n
    \n
    Raises ToolkitException:
    \n
    | If the main view has no tabs.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`get_text_input_context_menu`(object_name)\u00b6
  \n

    Return a TextInputContextMenu emulator.

    \n

    \n\n\n
    \n
    Parameters: | object_name – The QML objectName property of the popover.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`get_toolbar`()\u00b6
  \n

    Return the Toolbar custom proxy object of the MainView.

    \n

    \n\n\n
    \n
    Raises ToolkitException:
    \n
    | If the main view has no toolbar.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`go_back`(instance, *args, **kwargs)\u00b6
  \n

    Go to the previous page.

    \n
  \n\n
  \n
  \n`open_toolbar`(instance, *args, **kwargs)\u00b6
  \n

    Open the toolbar if it is not already opened.

    \n

    \n\n\n
    \n
    Returns: | The toolbar.\n
    \n
    Raises ToolkitException:
    \n
    | If the main view has no toolbar.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`switch_to_next_tab`(instance, *args, **kwargs)\u00b6
  \n

    Open the next tab.

    \n

    \n\n\n
    \n
    Returns: | The newly opened tab.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`switch_to_previous_tab`(instance, *args, **kwargs)\u00b6
  \n

    Open the previous tab.

    \n

    \n\n\n
    \n
    Returns: | The newly opened tab.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`switch_to_tab`(instance, *args, **kwargs)\u00b6
  \n

    Open a tab.

    \n

    \n\n\n
    \n
    Parameters: | object_name – The QML objectName property of the tab.\n
    \n
    Returns: | The newly opened tab.\n
    \n
    Raises ToolkitException:
    \n
    | If there is no tab with that object\nname.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`switch_to_tab_by_index`(instance, *args, **kwargs)\u00b6
  \n

    Open a tab.

    \n

    \n\n\n
    \n
    Parameters: | index – The index of the tab to open.\n
    \n
    Returns: | The newly opened tab.\n
    \n
    Raises ToolkitException:
    \n
    | If the tab index\nis out of range.\n
    \n
    \n

    \n
  \n\n
  \n
  \nclassmethod `validate_dbus_object`(path, state)\u00b6
  \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``OptionSelector`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  OptionSelector Autopilot custom proxy object

  \n
  \n
  \n`get_current_label`()\u00b6
  \n

    gets the text of the currently selected item

    \n
  \n\n
  \n
  \n`get_option_count`()\u00b6
  \n

    Gets the number of items in the option selector

    \n
  \n\n
  \n
  \n`get_selected_index`()\u00b6
  \n

    Gets the current selected index of the QQuickListView

    \n
  \n\n
  \n
  \n`get_selected_text`()\u00b6
  \n

    gets the text of the currently selected item

    \n
  \n\n
  \n
  \n`select_option`(*args, **kwargs)\u00b6
  \n

    Select delegate in option selector

    \n
    \n
    Example usage::
    \n
      select_option(objectName=”myOptionSelectorDelegate”)\nselect_option(‘Label’, text=”some_text_here”)
    \n
    \n

    \n\n\n
    \n
    Parameters: | kwargs – keywords used to find property(s) of delegate in\noption selector\n
    \n
    \n

    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``QQuickFlickable`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._flickable.Scrollable`

  \n
  \n
  \n`margin_to_swipe_from_bottom` = 16.0\u00b6
  \n
  \n\n
  \n
  \n`margin_to_swipe_from_top` = 8.0\u00b6
  \n
  \n\n
  \n
  \n`pull_to_refresh`(instance, *args, **kwargs)\u00b6
  \n

    Pulls the flickable down and triggers a refresh on it.

    \n

    \n\n\n
    \n
    Raises ubuntuuitoolkit.ToolkitException:
    \n
    | If the flickable has no pull\nto release functionality.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`swipe_child_into_view`(instance, *args, **kwargs)\u00b6
  \n

    Make the child visible.

    \n

    Currently it works only when the object needs to be swiped vertically.\nTODO implement horizontal swiping. –elopio - 2014-03-21

    \n
  \n\n
  \n
  \n`swipe_to_bottom`(instance, *args, **kwargs)\u00b6
  \n
  \n\n
  \n
  \n`swipe_to_show_more_above`(instance, *args, **kwargs)\u00b6
  \n
  \n\n
  \n
  \n`swipe_to_show_more_below`(instance, *args, **kwargs)\u00b6
  \n
  \n\n
  \n
  \n`swipe_to_top`(instance, *args, **kwargs)\u00b6
  \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``QQuickGridView`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._flickable.QQuickFlickable`

  \n

  Autopilot helper for the QQuickGridView component.

  \n

\n\n

\n
\nclass `ubuntuuitoolkit.``QQuickListView`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._flickable.QQuickFlickable`

  \n
  \n
  \n`click_element`(instance, *args, **kwargs)\u00b6
  \n

    Click an element from the list.

    \n

    It swipes the element into view if it’s center is not visible.

    \n

    \n\n\n
    \n
    Parameters: | \n objectName – The objectName property of the element to click. \n direction – The direction where the element is, it can be\neither ‘above’ or ‘below’. Default value is None, which means we\ndon’t know where the object is and we will need to search the full\nlist. \n \n\n
    \n
    \n

    \n
  \n\n
  \n
  \n`drag_item`(instance, *args, **kwargs)\u00b6
  \n
  \n\n
  \n
  \n`enable_select_mode`(instance, *args, **kwargs)\u00b6
  \n

    Default implementation to enable select mode. Performs a long tap\nover the first list item in the ListView. The delegates must be\nthe new ListItem components.

    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``TabBar`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  TabBar Autopilot custom proxy object.

  \n
  \n
  \n`switch_to_next_tab`(instance, *args, **kwargs)\u00b6
  \n

    Open the next tab.

    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``Tabs`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  Tabs Autopilot custom proxy object.

  \n
  \n
  \n`get_current_tab`()\u00b6
  \n

    Return the currently selected tab.

    \n
  \n\n
  \n
  \n`get_number_of_tabs`()\u00b6
  \n

    Return the number of tabs.

    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``TextArea`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._textfield.TextField`

  \n

  TextArea autopilot emulator.

  \n
  \n
  \n`clear`()\u00b6
  \n

    Clear the text area.

    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``TextField`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  TextField Autopilot custom proxy object.

  \n
  \n
  \n`clear`(instance, *args, **kwargs)\u00b6
  \n

    Clear the text field.

    \n
  \n\n
  \n
  \n`is_empty`()\u00b6
  \n

    Return True if the text field is empty. False otherwise.

    \n
  \n\n
  \n
  \n`write`(instance, *args, **kwargs)\u00b6
  \n

    Write into the text field.

    \n

    \n\n\n
    \n
    Parameters: | \n text – The text to write. \n clear – If True, the text field will be cleared before\nwriting the text. If False, the text will be appended at the end\nof the text field. Default is True. \n \n\n
    \n
    \n

    \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``Toolbar`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._common.UbuntuUIToolkitCustomProxyObjectBase`

  \n

  Toolbar Autopilot custom proxy object.

  \n
  \n
  \n`click_back_button`(instance, *args, **kwargs)\u00b6
  \n

    Click the back button of the toolbar.

    \n
  \n\n
  \n
  \n`click_button`(instance, *args, **kwargs)\u00b6
  \n

    Click a button of the toolbar.

    \n

    The toolbar should be opened before clicking the button, or an\nexception will be raised. If the toolbar is closed for some reason\n(e.g., timer finishes) after moving the mouse cursor and before\nclicking the button, it is re-opened automatically by this function.

    \n

    \n\n\n
    \n
    Parameters: | object_name – The QML objectName property of the button.\n
    \n
    Raises ToolkitException:
    \n
    | If there is no button with that object\nname.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`close`(instance, *args, **kwargs)\u00b6
  \n

    Close the toolbar if it’s opened.

    \n
  \n\n
  \n
  \n`open`(instance, *args, **kwargs)\u00b6
  \n

    Open the toolbar if it’s not already opened.

    \n

    \n\n\n
    \n
    Returns: | The toolbar.\n
    \n
    \n

    \n
  \n\n

\n\n

\n
\nexception `ubuntuuitoolkit.``ToolkitException`\u00b6
\n

  Bases: `exceptions.Exception`

  \n

  Exception raised when there is an error with the custom proxy object.

  \n

\n\n

\n
\nclass `ubuntuuitoolkit.``UbuntuListView11`(*args)\u00b6
\n

  Bases: `ubuntuuitoolkit._custom_proxy_objects._qquicklistview.QQuickListView`

  \n

  Autopilot helper for the UbuntuListView 1.1.

  \n
  \n
  \n`manual_refresh_nowait`()\u00b6
  \n
  \n\n
  \n
  \n`manual_refresh_wait`()\u00b6
  \n
  \n\n
  \n
  \n`pull_to_refresh_enabled`()\u00b6
  \n
  \n\n
  \n
  \n`wait_refresh_completed`()\u00b6
  \n
  \n\n

\n\n

\n
\nclass `ubuntuuitoolkit.``UbuntuUIToolkitCustomProxyObjectBase`(*args)\u00b6
\n

  Bases: `autopilot.introspection.dbus.CustomEmulatorBase`

  \n

  A base class for all the Ubuntu UI Toolkit custom proxy objects.

  \n
  \n
  \n`is_flickable`()\u00b6
  \n

    Check if the object is flickable.

    \n

    If the object has a flicking attribute, we consider it as a flickable.

    \n

    \n\n\n
    \n
    Returns: | True if the object is flickable. False otherwise.\n
    \n
    \n

    \n
  \n\n
  \n
  \n`swipe_into_view`(instance, *args, **kwargs)\u00b6
  \n

    Make the object visible.

    \n

    Currently it works only when the object needs to be swiped vertically.\nTODO implement horizontal swiping. –elopio - 2014-03-21

    \n
  \n\n

\n\n
\n
\n", "display_toc": true, "title": "ubuntuuitoolkit Package", "sourcename": "ubuntuuitoolkit.txt", "customsidebar": null, "current_page_name": "ubuntuuitoolkit", "next": null, "rellinks": [["genindex", "General Index", "I", "index"], ["py-modindex", "Python Module Index", "", "modules"], ["index", "Welcome to ubuntu-ui-toolkit-autopilot’s documentation!", "P", "previous"]], "meta": {}, "parents": [], "sidebars": null, "toc": "

\n
- ubuntuuitoolkit Package
  \n
  - `custom proxy object` Module
  \n
  \n
\n

\n", "prev": {"link": "../", "title": "Welcome to ubuntu-ui-toolkit-autopilot’s documentation!"}, "metatags": ""}