selection_actions.go
func (s *Selection) Touch(event Touch) error {
	var touchFunc func(x, y int) error
	switch event {
	case HoldFinger:
		touchFunc = s.session.TouchDown
	case ReleaseFinger:
		touchFunc = s.session.TouchUp
	case MoveFinger:
		touchFunc = s.session.TouchMove
	default:
		return fmt.Errorf("failed to %s on %s: invalid touch event", event, s)
	}

	return s.forEachElement(func(selectedElement element.Element) error {
		x, y, err := selectedElement.GetLocation()
		if err != nil {
			return fmt.Errorf("failed to retrieve location of %s: %s", s, err)
		}
		if err := touchFunc(x, y); err != nil {
			return fmt.Errorf("failed to flick finger on %s: %s", s, err)
		}
		return nil
	})
}
func (s *Selection) Touch(event Touch) error {
	var touchFunc func(x, y int) error
	switch event {
	case HoldFinger:
		touchFunc = s.session.TouchDown
	case ReleaseFinger:
		touchFunc = s.session.TouchUp
	case MoveFinger:
		touchFunc = s.session.TouchMove
	default:
		return fmt.Errorf("failed to %s on %s: invalid touch event", event, s)
	}

	return s.forEachElement(func(selectedElement element.Element) error {
		x, y, err := selectedElement.GetLocation()
		if err != nil {
			return fmt.Errorf("failed to retrieve location of %s: %s", s, err)
		}
		if err := touchFunc(x, y); err != nil {
			return fmt.Errorf("failed to flick finger on %s: %s", s, err)
		}
		return nil
	})
}
// Touch performs the provided Touch event at the location of each element in the
// selection.