This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Working with author pages
kkarolk edited this page Jul 22, 2016
·
2 revisions
Lets say AEM Author page that you want to test has following properties:
- content url
/content/geometrixx/en/products/square.html
, - page title
Square
.
Then Page Object class for Square
page will be as follows:
@PageObject
public class SquarePage extends AbstractPage {
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;
}
}
The AbstractPage
class provides methods for opening page and verifying that loaded page has proper title.
Let's open Square
page and verify that it was properly loaded.
@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());
}
}
Following methods were implemented in AbstractPage class so you don't have to worry about them:
-
squarePage.open();
is opening page in the browser based onURL = "/content/geometrixx/en/products/square.html"
provided in SquarePage class, -
squarePage.isDisplayed()
is verifying that page opened in the browser has proper title based onPAGE_TITLE = "Square"
provided in SquarePage class.
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial