Class EditorPage

  • Direct Known Subclasses:
    PageEditorPage

    public abstract class EditorPage
    extends BasePage
    Base editor page class for inheritance.
    • Field Detail

      • selectModeButton

        protected com.codeborne.selenide.SelenideElement selectModeButton
    • Constructor Detail

      • EditorPage

        protected EditorPage​(java.net.URI base,
                             java.lang.String pagePath)
      • EditorPage

        protected EditorPage​(java.lang.String pagePath)
    • Method Detail

      • getPageName

        public java.lang.String getPageName()
        Returns:
        returns the current page name
      • getPageInfo

        public PageInfo getPageInfo()
        Provides the PageInfo object of page opened in the editor.
        Returns:
        PageInfo Object
      • getOverlayWrapper

        public com.codeborne.selenide.SelenideElement getOverlayWrapper()
        Returns:
        the SelenideElement for the OverlayWrapper of Editor
      • getContentWrapper

        public com.codeborne.selenide.SelenideElement getContentWrapper()
        Returns:
        the SelenideElement for the ContentWrapper of Editor
      • getContentFrame

        public com.codeborne.selenide.SelenideElement getContentFrame()
        Returns:
        the SelenideElement for the ContentFrame of Editor
      • getUndoButton

        public com.codeborne.selenide.SelenideElement getUndoButton()
        Returns:
        the SelenideElement for the Undo Button of Editor
      • getRedoButton

        public com.codeborne.selenide.SelenideElement getRedoButton()
        Returns:
        the SelenideElement for the Redo Button of Editor
      • getStylesButton

        public com.codeborne.selenide.SelenideElement getStylesButton()
        Returns:
        the SelenideElement for the Styles Button of Editor
      • getTextComponents

        public com.codeborne.selenide.ElementsCollection getTextComponents()
        Returns:
        list of avaiable Text Components available on the page
      • enterMode

        protected <T extends EditorPage> T enterMode​(com.codeborne.selenide.SelenideElement targetingModeButton,
                                                     com.codeborne.selenide.SelenideElement targetingLayerButton)
                                              throws java.util.concurrent.TimeoutException
        Throws:
        java.util.concurrent.TimeoutException
      • enterPreviewMode

        public <T extends EditorPage> T enterPreviewMode()
        To enter the preview mode
        Type Parameters:
        T - type of EditorPage
        Returns:
        Instance of current EditorPage
      • isInPreviewMode

        public boolean isInPreviewMode()
        To check if the Editor page in preview mode
        Returns:
        true if EditorPage is in Preview Mode, else false
      • openEditableToolbar

        public EditableToolbar openEditableToolbar​(java.lang.String resourcePath)
                                            throws java.util.concurrent.TimeoutException
        Opens the editor tool bar for a resource
        Parameters:
        resourcePath - path of the resource
        Returns:
        EditableToolbar instance
        Throws:
        java.util.concurrent.TimeoutException - if component is not visible before Timeout
      • getComponentOverlay

        public com.codeborne.selenide.SelenideElement getComponentOverlay​(java.lang.String resourcePath)
        Provides the SelenideElement object for the overlay of editable component on editor page.
        Parameters:
        resourcePath - path of the component resource
        Returns:
        SelenideElement object for overlay
      • getInspectableComponentOverlay

        public com.codeborne.selenide.SelenideElement getInspectableComponentOverlay​(java.lang.String resourcePath)
        Provides the SelenideElement object for the overlay of Inspectable component on editor page.
        Parameters:
        resourcePath - path of the component resource
        Returns:
        SelenideElement object for overlay
      • isComponentOverlaySelected

        public boolean isComponentOverlaySelected​(com.codeborne.selenide.SelenideElement componentOverlay)
        confirms of component overlay has been selected
        Parameters:
        componentOverlay - SelenideElement object for ComponentOverlay
        Returns:
        true if ComponentOverlay has been selected, false otherwise
      • getEditables

        public com.codeborne.selenide.ElementsCollection getEditables()
        Returns:
        collections of all the editable components
      • getInspectables

        public com.codeborne.selenide.ElementsCollection getInspectables()
        Returns:
        collections of all the inspectable components
      • waitReady

        public void waitReady()
        Description copied from class: BasePage
        Wait that the page is ready (according to coral).
        Overrides:
        waitReady in class BasePage