Ejemplo n.º 1
0
    def double_click_item(self, locator, x_offset=0, y_offset=0):
        """Double clicks an item.

        ``locator`` is the locator of the item or object of an item.
        Locator syntax is explained in `Item locators`.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to fine tune
        mouse position relative to the center of the item.
        """
        item = self.state._get_item_by_locator(locator)
        Clicks.double_click(item, x_offset, y_offset)
    def double_click_listview_row_by_index(self,
                                           locator,
                                           row_index,
                                           x_offset=0,
                                           y_offset=0):
        """Double clicks a listview row at index.

        ``locator`` is the locator of the listview or ListView item object.
        Locator syntax is explained in `Item locators`.

        ``row_index`` is the zero-based row index.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to define the coordinates to click at,
        relative to the center of the item.

        Example:
        | Double Click Listview Row By Index | id:addressList | 4 |
        """
        row = self._get_row_by_index(locator, row_index)
        Clicks.double_click(row, x_offset, y_offset)
    def double_click_listview_row_by_text(self,
                                          locator,
                                          text,
                                          x_offset=0,
                                          y_offset=0):
        """Double clicks a listview row with matching text.

        ``locator`` is the locator of the listview or the ListView item object.
        Locator syntax is explained in `Item locators`.

        ``text`` is the exact text of the row. If there are multiple cells on the row, the text will be matched
        against the first cell.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to define the coordinates to click at,
        relative to the center of the item.

        Example:
        | Double Click Listview Row By Text | id:cities | Berlin |
        """
        row = self._get_row_by_text(locator, text)
        Clicks.double_click(row, x_offset, y_offset)
    def double_click_listview_row(self,
                                  locator,
                                  column_name,
                                  cell_text,
                                  x_offset=0,
                                  y_offset=0):
        """Double clicks a listview row.

        ``locator`` is the locator of the listview or ListView item object.
        Locator syntax is explained in `Item locators`.

        ``column_name`` and ``cell_text`` define the row. Row is the first matching row where text in column
        ``column_name`` is ``cell_text``.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to define the coordinates to click at,
        relative to the center of the item.

        Example:
        | Double Click Listview Row | id:addressList | City | Helsinki | # double click row that has the text "Helsinki" in the column "City" |
        """
        row = self._get_row(locator, column_name, cell_text)
        Clicks.double_click(row, x_offset, y_offset)
    def double_click_listview_cell(self,
                                   locator,
                                   column_name,
                                   row_index,
                                   x_offset=0,
                                   y_offset=0):
        """Double clicks a listview cell.

        ``locator`` is the locator of the listview or ListView item object.
        Locator syntax is explained in `Item locators`.

        ``column_name`` is the name of the column.

        ``row_index`` is the zero-based row index.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to define the coordinates to click at,
        relative to the center of the item.

        Example:
        | Double Click Listview Cell | id:addressList | Street | 0 | # double click cell in the column "Street" of the first row |
        """
        cell = self._get_cell(locator, column_name, row_index)
        Clicks.double_click(cell, x_offset, y_offset)
    def double_click_listview_cell_by_index(self,
                                            locator,
                                            row_index,
                                            column_index,
                                            x_offset=0,
                                            y_offset=0):
        """Double clicks a listview cell at index.

        ``locator`` is the locator of the listview or ListView item object.
        Locator syntax is explained in `Item locators`.

        ``row_index`` is the zero-based row index.

        ``column_index`` is the zero-based column index.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to fine tune
        mouse position relative to the center of the item.

        Example:
        | Double Click Listview Cell By Index | id:addressList | 0 | 0 |
        """
        cell = self._get_cell_by_index(locator, row_index, column_index)
        Clicks.double_click(cell, x_offset, y_offset)