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

Sites miscelaneous

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

Sites management

Check page presence

We can check if a page of example title is on the list of pages on the current scope.

To do so, we need to use isPagePresent(String title) method.

Example code below :

@Test
  public void shouldCheckIfPageExists() {
    siteadminPage.open(“/content/ourPagesParent”);
    assertTrue(siteadminPage.isPagePresent(“ourPageTitle”));
  }

Wait for page count

When current context is modified, for example, the page was pasted in current scope, we can wait until the number of pages reaches certain value.

Example code below :

@Test
  public void shouldWaitForPageCount() {
    siteadminPage.open(“/content/pathWithSubPages”);
    
    // Some operations affecting currently opened scope
    
    siteadminPage.waitForPageCount(2);
  }

Check if subpages are present

We can also check, if currently opened AEM Sites scope contains any subpages.

We can do that using hasSubpages() method.

Example code below :

@Test
  public void shouldCheckIfContextHasSubpages() {
    siteadminPage.open(“/content/pathWithSubPages”);
    assertTrue(siteadminPage.hasChildPages());
  }

Back to Sites management

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