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

Working With Publish Pages

Mikołaj Mański edited this page Jul 26, 2016 · 3 revisions

Working with publish pages

Working with publish pages is similar to author pages. The only difference is extending your Page Objects with PublishPage abstract class instead of AbstractPage class. When your Page Object will override it - Bobcat will know that properties related to the publish instance should be used. Example:

@PageObject
public class SquarePage extends PublishPage {

   private static final String URL = "/content/geometrixx/en/products/square.html";

   private static final String PAGE_TITLE = "Square";

   @Override
   public String getContentPath() {
      return URL;
   }

   @Override
   public String getPageTitle() {
      return PAGE_TITLE;
   }
}

This tells Bobcat to open declared pages on the Publish instance of your AEM. With such declaration, Bobcat will use the following properties from the instances.properies file:

  • publish.url
  • publish.ip
  • publish.login
  • publish.password

Example usage in test

Usage of publish pages doesn't differ from author pages.

@RunWith(TestRunner.class)
@Modules(GuiceModule.class)
public class SquarePageTest {

  @Inject
  private AemLogin aemLogin;

  @Inject
  private SquarePage squarePage;

  @Test
  public void openSquarePageTest() {
    aemLogin.authorLogin();
    squarePage.open();
    assertTrue(squarePage.isDisplayed());
  }
}

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