Package org.xwiki.ckeditor.test.po
Class LinkSelectorModal
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.ckeditor.test.po.LinkSelectorModal
-
public class LinkSelectorModal extends BaseElement
Page object for the CKEditor link selection modal.- Since:
- 15.0RC1, 14.10.3
- Version:
- $Id: 93d7ecb532cbe8fac3c572871ca0e7a2cb8db188 $
-
-
Constructor Summary
Constructors Constructor Description LinkSelectorModal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clickOK()
Click on the"OK"
button of the modal.LinkSelectorModal
selectPageItem(String hint, String label)
Click on one of the choices proposed in the dropdown after usingsetResourceValue(String)
, based on its hint and label.LinkSelectorModal
setResourceType(String resourceType)
Select a resource type for the resource picker (e.g.,"doc"
, or"attachment"
).LinkSelectorModal
setResourceValue(String value)
Set the given value on the resource value search field.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
setResourceValue
public LinkSelectorModal setResourceValue(String value)
Set the given value on the resource value search field.- Parameters:
value
- the value to use to search for a resource (i.e., page or attachment)- Returns:
- the current page object
-
selectPageItem
public LinkSelectorModal selectPageItem(String hint, String label)
Click on one of the choices proposed in the dropdown after usingsetResourceValue(String)
, based on its hint and label.- Parameters:
hint
- the hint of the resource (e.g,"ParentSpace / ChildSpace"
for a page)label
- the label of the resource (e.g.,"PageName"
for a page, or the attachment name for an attachment)- Returns:
- the current page object
- Throws:
NoSuchElementException
- in case of issue when looking for the item by its hint and label
-
clickOK
public void clickOK()
Click on the"OK"
button of the modal.
-
setResourceType
public LinkSelectorModal setResourceType(String resourceType)
Select a resource type for the resource picker (e.g.,"doc"
, or"attachment"
).- Parameters:
resourceType
- the resource type to select- Returns:
- the current page object
-
-