Package org.xwiki.test.ui.po
Class EntityTreeElement
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.EntityTreeElement
-
public class EntityTreeElement extends BaseElement
Represents the actions possible on the XWiki Explorer Tree.- Since:
- 5.1M1
- Version:
- $Id: 8df661e0f5597a6fd0d5de24023c99af44fbe075 $
-
-
Constructor Summary
Constructors Constructor Description EntityTreeElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasAttachment(String spaceName, String pageName, String fileName)booleanhasPage(String spaceName, String pageName)booleanhasPage(String spaceName, String pageName, String pageTitle)booleanhasSpace(String spaceName)voidlookupEntity(String entityReference)Types the given text in the input box below the tree.EntityTreeElementwaitForAttachment(String spaceName, String pageName, String fileName)Waits for the node corresponding to the specified attachments to be present but not selected.EntityTreeElementwaitForAttachment(String spaceName, String pageName, String fileName, boolean selected)Waits for the node corresponding to the specified attachment to be present.EntityTreeElementwaitForPage(String spaceName, String pageName)Waits for the node corresponding to the specified page to be present but not selected.EntityTreeElementwaitForPage(String spaceName, String pageName, boolean selected)Waits for the node corresponding to the specified page to be present.EntityTreeElementwaitForPage(String spaceName, String pageName, String pageTitle)Waits for the node corresponding to the specified page to be present but not selected.EntityTreeElementwaitForPage(String spaceName, String pageName, String pageTitle, boolean selected)Waits for the node corresponding to the specified page to be present.EntityTreeElementwaitForSpace(String spaceName)Waits for the node corresponding to the specified space to be present but not selected.EntityTreeElementwaitForSpace(String spaceName, boolean selected)Waits for the node corresponding to the specified space to be present.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
waitForSpace
public EntityTreeElement waitForSpace(String spaceName)
Waits for the node corresponding to the specified space to be present but not selected.- Parameters:
spaceName- the space name- Returns:
- this
-
waitForSpace
public EntityTreeElement waitForSpace(String spaceName, boolean selected)
Waits for the node corresponding to the specified space to be present.- Parameters:
spaceName- the space nameselected-trueif the space node should be selected,falseotherwise- Returns:
- this
-
hasSpace
public boolean hasSpace(String spaceName)
- Parameters:
spaceName- the space name- Returns:
trueif the node corresponding to the specified space is present (selected or not),falseotherwise
-
waitForPage
public EntityTreeElement waitForPage(String spaceName, String pageName)
Waits for the node corresponding to the specified page to be present but not selected. We assume the page title equals the page name.- Parameters:
spaceName- the space containing the pagepageName- the page name- Returns:
- this
-
waitForPage
public EntityTreeElement waitForPage(String spaceName, String pageName, String pageTitle)
Waits for the node corresponding to the specified page to be present but not selected.- Parameters:
spaceName- the space containing the pagepageName- the page name (used as the node tool tip)pageTitle- the page title (used as the node label)- Returns:
- this
-
waitForPage
public EntityTreeElement waitForPage(String spaceName, String pageName, boolean selected)
Waits for the node corresponding to the specified page to be present. We assume the page title equals the page name.- Parameters:
spaceName- the space containing the pagepageName- the page nameselected-trueif the page node should be selected,falseotherwise- Returns:
- this
-
waitForPage
public EntityTreeElement waitForPage(String spaceName, String pageName, String pageTitle, boolean selected)
Waits for the node corresponding to the specified page to be present.- Parameters:
spaceName- the space containing the pagepageName- the page name (used as the node hint)pageTitle- the page title (used as the node label)selected-trueif the page node should be selected,falseotherwise- Returns:
- this
-
hasPage
public boolean hasPage(String spaceName, String pageName)
- Parameters:
spaceName- the space containing the pagepageName- the page name- Returns:
trueif the specified page node is present, selected or not,falseotherwise; we assume the page title equals the page name
-
hasPage
public boolean hasPage(String spaceName, String pageName, String pageTitle)
- Parameters:
spaceName- the space containing the pagepageName- the page name (used as the node hint)pageTitle- the page title (used as the node label)- Returns:
trueif the specified page node is present, selected or not,falseotherwise
-
waitForAttachment
public EntityTreeElement waitForAttachment(String spaceName, String pageName, String fileName)
Waits for the node corresponding to the specified attachments to be present but not selected.- Parameters:
spaceName- the space containing the pagepageName- the page that holds the attachmentfileName- the attachment file name- Returns:
- this
-
waitForAttachment
public EntityTreeElement waitForAttachment(String spaceName, String pageName, String fileName, boolean selected)
Waits for the node corresponding to the specified attachment to be present.- Parameters:
spaceName- the space containing the pagepageName- the page that holds the attachmentfileName- the attachment file nameselected-trueif the attachment node should be selected,falseotherwise- Returns:
- this
-
hasAttachment
public boolean hasAttachment(String spaceName, String pageName, String fileName)
- Parameters:
spaceName- the space containing the pagepageName- the page that holds the attachmentfileName- the attachment file name- Returns:
trueif the specified attachment node is present, selected or not,falseotherwise
-
lookupEntity
public void lookupEntity(String entityReference)
Types the given text in the input box below the tree. As a result the tree will lookup an entity among its nodes (e.g. page, attachment) that matches the given reference.- Parameters:
entityReference- the text to be typed in the input box below the tree, usually an entity reference
-
-