Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Sites ChildPageRow

Wiktor Szczepaniak edited this page Sep 5, 2016 · 2 revisions

Sites management

ChildPageRow class

Class can be used to do operations on the pages list element representing a page (row on a list).

To get an instance of ChildPageRow class from the currently open scope, we would have to use SiteadminPage.getPageFromList(String title) method.

Example code below:

@Test
public void shouldGetChildPageRowInstance() {
  ChildPageRow childPageRow = siteadminPage.getPageFromList("examplePage");
}

Getting page title

To get title of page, we should use getTitle() method.

Example code :

@Test
public void shouldGetPagesTitle() {
  String title = siteadminPage.getPageFromList("examplePage").getTitle();
}

Getting page href

To get href of a page in the list, we should use getHref() method.

Example code :

@Test
 public void shouldGetPagesHref() {
   String pageLink = siteadminPage.getPageFromList("examplePage").getHref();
 }

Back to Sites management

Select page

To select page we should use select() method.

Example code :

@Test
 public void shouldSelectPage() {
   siteadminPage.getPageFromList("examplePage").select();
 }

Click the page

To click the page row on the list we should use click() method.

Example code :

@Test
public void shouldClickPage() {
  siteadminPage.getPageFromList("examplePage").click();
}

PageModificationInfo

It is a class that provides access to page's content modification information :

  • User name of author of changes - getModifiedBy() method
  • Date of modification - getWhenModified() method

To get instance we need a ChildPageRow instance and execute it's getModificationInfo() method.

Example code :

@Test
public void shouldGetPageModificationInformation() { 
  ChildPageRow childPageRow = siteadminPage.getPageFromList("examplePage");
  
  PageModificationInfo modificationInfo = childPageRow.getModificationInfo(); 
  
  String author = modificationInfo.getModifiedBy();
  String dateOfChanges = modificationInfo.getWhenModified();
}

PageActivationStatus

It is a class that provides access to page's activation information :

  • Replication date - getREplicationActionDate() method
  • Replication author - getReplicationActionUser() method
  • ActivationStatus - Enum containing PUBLISHED, NOT_PUBLISHED, SCHEDULED values

To get instance we need a ChildPageRow instance and execute it's getPageActivationStatus() method.

Example code :

@Test
public void shouldGetPageActivationInformation() {
  ChildPageRow childPageRow = siteadminPage.getPageFromList("examplePage");
  
  PageActivationStatus pageActivationStatus = childPageRow.getPageActivationStatus(); 
  
  String author = pageActivationStatus.getReplicationActionUser();
  String dateOfChanges = pageActivationStatus.getReplicationActionDate();
  ActivationStatus status = pageActivationStatus.getActivationStatus();
}

Getting started with Bobcat

  1. Getting started

AEM Related Features

  1. Authoring tutorial - Classic
  1. AEM Classic Authoring Advanced usage
  1. Authoring tutorial - Touch UI
Clone this wiki locally