Ejemplo n.º 1
0
    def _move_to_selected(self):
        """ Clicks the button for moving items from unselected to selected.

        Returns: :py:class:`bool` with success.
        """
        sel.click(sel.element(self._to_selected))
        return not any(map(flash.is_error, flash.get_all_messages()))
Ejemplo n.º 2
0
    def _move_to_selected(self):
        """ Clicks the button for moving items from unselected to selected.

        Returns: :py:class:`bool` with success.
        """
        sel.click(sel.element(self._to_selected))
        return not any(map(flash.is_error, flash.get_all_messages()))
Ejemplo n.º 3
0
    def remove_all(self):
        """ Flush the list of selected items.

        Returns: :py:class:`bool` with success.
        """
        if self._remove_all is None:
            raise NotImplementedError("'Remove all' button was not specified!")
        sel.click(sel.element(self._remove_all))
        return not any(map(flash.is_error, flash.get_all_messages()))
Ejemplo n.º 4
0
    def remove_all(self):
        """ Flush the list of selected items.

        Returns: :py:class:`bool` with success.
        """
        if len(self._selected.options) == 0:
            return  # No need to flush
        if self._remove_all is None:
            # Check all selected
            self.remove(*[sel.text(o).encode("utf-8").strip() for o in self._selected.options])
        else:
            sel.click(sel.element(self._remove_all))
        return not any(map(flash.is_error, flash.get_all_messages()))
Ejemplo n.º 5
0
    def remove_all(self):
        """ Flush the list of selected items.

        Returns: :py:class:`bool` with success.
        """
        if len(self._selected.options) == 0:
            return  # No need to flush
        if self._remove_all is None:
            # Check all selected
            self.remove(*[
                sel.text(o).encode("utf-8").strip()
                for o in self._selected.options
            ])
        else:
            sel.click(sel.element(self._remove_all))
        return not any(map(flash.is_error, flash.get_all_messages()))
Ejemplo n.º 6
0
 def _move_to_selected(self):
     sel.click(sel.element(self._to_selected))
     return not any(map(flash.is_error, flash.get_all_messages()))