1 package com.atlassian.pageobjects.elements;
2
3 import java.util.List;
4
5 /**
6 * Represents a standard multi-select HTML element.
7 *
8 */
9 public interface MultiSelectElement extends PageElement
10 {
11 /**
12 * All options
13 *
14 * @return all options of this multi-select
15 */
16 List<Option> getAllOptions();
17
18 /**
19 * Selected options.
20 *
21 * @return selected options of this multi-select
22 */
23 List<Option> getSelected();
24
25 /**
26 * Add given option to the current selection.
27 *
28 * @param option option to add
29 * @return this multi-select instance
30 */
31 MultiSelectElement select(Option option);
32
33 /**
34 * Remove given option from the current selection
35 *
36 * @param option option to remove
37 * @return this multi-select instance
38 */
39 MultiSelectElement unselect(Option option);
40
41 /**
42 * Add all options to the current selection.
43 *
44 * @return this multi-select instance
45 */
46 MultiSelectElement selectAll();
47
48 /**
49 * Remove all options from the current selection
50 *
51 * @return this multi-select instance
52 */
53 MultiSelectElement unselectAll();
54 }