https://github.com/headwirecom/aem-selenium-automation-framework-example
https://github.com/headwirecom/aem-selenium-automation-framework-example
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/headwirecom/aem-selenium-automation-framework-example
- Owner: headwirecom
- Created: 2017-02-27T19:24:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-13T18:05:25.000Z (about 9 years ago)
- Last Synced: 2025-04-20T04:56:27.063Z (about 1 year ago)
- Language: Java
- Size: 3.44 MB
- Stars: 2
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Installation
### Maven
To use the framework in a maven project, add the following dependency:
```
com.cqblueprints.testing
test-framework
0.6.0
>
```
### Usage
To begin using the built in functionality you must create a class that extends the TestBase class:
public class ComponentTest extends TestBase {}
The TestBase class instantiates the WebDriver and sets up the environment from a json file. To write test cases, the page objects provide high level AEM actions that remove the need to use selenium actions directly in tests. Example:
```
@Test
public void openSiteAdmin() {
LoginPage loginPage = PageFactory.initElements(driver, LoginPage.class);
WelcomePage welcomePage = loginPage.loginAs(environment.getTestUser(), environment.getTestPassword());
SiteAdminPage siteAdminPage = welcomePage.openSiteAdmin();
}
```