Class DocumentPicker
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.DocumentPicker
-
public class DocumentPicker extends BaseElement
Represents the Document Picker.- Since:
- 7.2M3
- Version:
- $Id: baca02165ad08dcd1d9b8ea6c8374f681d8b757f $
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.WebElementcontainer
-
Constructor Summary
Constructors Constructor Description DocumentPicker()Use this constructor only if there is only one document picker on the page.DocumentPicker(org.openqa.selenium.WebElement container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbrowseDocuments()Clicks the "pick document" button that triggers a modal pop-up to be displayed.BreadcrumbElementgetLocation()StringgetName()org.openqa.selenium.WebElementgetNameInput()StringgetParent()org.openqa.selenium.WebElementgetParentInput()StringgetTitle()org.openqa.selenium.WebElementgetTitleInput()DocumentPickersetName(String name)DocumentPickersetParent(String parent)DocumentPickersetTitle(String title)DocumentPickersetWiki(String wikiName)DocumentPickertoggleLocationAdvancedEdit()voidwaitForLocation(String expectedPathString)Wait for the Breadcrumb to display the passed path string and throw an exception if the timeout is reached.voidwaitForLocation(List<String> expectedPath)Wait for the Breadcrumb to display the passed path and throw an exception if the timeout is reached.DocumentPickerwaitForName(String name)Wait until the name field has been changed.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
getTitle
public String getTitle()
-
setTitle
public DocumentPicker setTitle(String title)
-
waitForName
public DocumentPicker waitForName(String name)
Wait until the name field has been changed.- Parameters:
name- the new name- Returns:
- this.
-
getTitleInput
public org.openqa.selenium.WebElement getTitleInput()
-
getLocation
public BreadcrumbElement getLocation()
-
toggleLocationAdvancedEdit
public DocumentPicker toggleLocationAdvancedEdit()
-
getParent
public String getParent()
-
setParent
public DocumentPicker setParent(String parent)
-
getParentInput
public org.openqa.selenium.WebElement getParentInput()
-
getName
public String getName()
-
setName
public DocumentPicker setName(String name)
-
getNameInput
public org.openqa.selenium.WebElement getNameInput()
-
setWiki
public DocumentPicker setWiki(String wikiName)
-
browseDocuments
public void browseDocuments()
Clicks the "pick document" button that triggers a modal pop-up to be displayed.The caller is responsible for handling the modal (or instantiating the right page object element), such we limit the extra coupling that would be required from the test framework if it were to instantiate and return the page object for the modal pop-up.
-
waitForLocation
public void waitForLocation(String expectedPathString)
Wait for the Breadcrumb to display the passed path string and throw an exception if the timeout is reached. Note that we need to wait since the Breadcrumb is updated live and asserting its content without waiting would lead to false positives.Note: This method can not be implemented inside
BreadcrumbElementbecause a change of parent replaces completely theBreadcrumbElement's container and thus it becomes stale. To avoid that, at each wait iteration, we lookup the current breadcrumb element and not a cached one.- Parameters:
expectedPathString- the path string to wait for- Since:
- 7.2RC1
-
waitForLocation
public void waitForLocation(List<String> expectedPath)
Wait for the Breadcrumb to display the passed path and throw an exception if the timeout is reached. Note that we need to wait since the Breadcrumb is updated live and asserting its content without waiting would lead to false positives.Note: This method can not be implemented inside
BreadcrumbElementbecause a change of parent replaces completely theBreadcrumbElement's container and thus it becomes stale. To avoid that, at each wait iteration, we lookup the current breadcrumb element and not a cached one.- Parameters:
expectedPath- the path to wait for- Since:
- 7.2RC1
-
-