1 package com.atlassian.pageobjects.components;
2
3 import com.atlassian.pageobjects.elements.PageElement;
4
5 /**
6 * Represents a components that needs to be activated to interact with.
7 */
8 public interface ActivatedComponent<T>
9 {
10 /**
11 * Gets the element that when activated opens the view of this components.
12 *
13 * @return Element
14 */
15 PageElement getTrigger();
16
17 /**
18 * The view Element, hidden or not present until activated.
19 *
20 * @return Element
21 */
22 PageElement getView();
23
24 /**
25 * Opens the view and waits until UI is ready for interaction.
26 *
27 * @return T
28 */
29 T open();
30
31 /**
32 * Whether the view is currently opened.
33 *
34 * @return true is components is open/activated, false otherwise.
35 */
36 boolean isOpen();
37 }