Class InlinePage


  • public class InlinePage
    extends ViewPage
    Represents the common actions possible on all Pages when using the "inline" action.
    Since:
    3.2M3
    Version:
    $Id: cd3e39a8b5be5d94d54eb8d27387f0ff1b8cc5f2 $
    • Constructor Detail

      • InlinePage

        public InlinePage()
    • Method Detail

      • clickPreview

        public void clickPreview()
      • clickSaveAndContinue

        public void clickSaveAndContinue()
      • clickSaveAndContinue

        public void clickSaveAndContinue​(boolean wait)
        Clicks on the Save and Continue button. Use this instead of clickSaveAndContinue() when you want to wait for a different message (e.g. an error message).
        Parameters:
        wait - true to wait for the page to be saved, false otherwise
      • getSaveAndContinueButton

        public org.openqa.selenium.WebElement getSaveAndContinueButton()
        Use this method instead of clickSaveAndContinue() and call WebElement.click() when you know that the next page is not a standard XWiki InlinePage.
        Returns:
        the save and continue button used to submit the form.
      • clickSaveAndView

        public <T extends ViewPage> T clickSaveAndView()
      • clickSaveAndView

        public void clickSaveAndView​(boolean wait)
        Useful when the save and view operation could fail on the client side and a reload (the view part) might thus not take place.
        Parameters:
        wait - true to wait for the page to be saved and reloaded, false otherwise
        Since:
        7.4M2
      • getSaveAndViewButton

        public org.openqa.selenium.WebElement getSaveAndViewButton()
        Use this method instead of clickSaveAndView() and call WebElement.click() when you know that the next page is not a standard XWiki InlinePage.
        Returns:
        the save and view button used to submit the form.
      • clickCancel

        public <T extends ViewPage> T clickCancel()
      • createViewPage

        protected <T extends ViewPage> T createViewPage()
        Can be overridden to return extended ViewPage.
      • getContent

        public String getContent()
        Overrides:
        getContent in class ViewPage
        Returns:
        the page's main content as text (no HTML)
      • getForm

        public org.openqa.selenium.WebElement getForm()
        Returns:
        the form element
      • getFormLocator

        public org.openqa.selenium.By getFormLocator()
      • getValue

        public String getValue​(String fieldName)
        Retrieves the value of the specified form field
        Parameters:
        fieldName - the name of a form field
        Returns:
        the value of the specified form field
        Since:
        7.0RC1
      • setValue

        public void setValue​(String fieldName,
                             String fieldValue)
        Sets the value of the specified form field
        Parameters:
        fieldName - the name of a form field
        fieldValue - the new value for the specified form field
        Since:
        7.0RC1