Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qaf-tm/qaf-support-galen
Galen framework support library for automated testing of look and feel for your responsive websites
https://github.com/qaf-tm/qaf-support-galen
bdd galen qaf selenium-webdriver test-automation testng ui-testing
Last synced: about 10 hours ago
JSON representation
Galen framework support library for automated testing of look and feel for your responsive websites
- Host: GitHub
- URL: https://github.com/qaf-tm/qaf-support-galen
- Owner: qaf-tm
- License: mit
- Created: 2021-09-14T17:21:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-27T06:58:08.000Z (over 1 year ago)
- Last Synced: 2024-12-07T10:02:55.920Z (about 2 months ago)
- Topics: bdd, galen, qaf, selenium-webdriver, test-automation, testng, ui-testing
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![License](https://img.shields.io/github/license/qmetry/qaf-support-galen.svg)](http://www.opensource.org/licenses/mit-license.php)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.qmetry/qaf-support-galen/badge.svg)](https://mvnrepository.com/artifact/com.qmetry/qaf-support-galen/latest)
[![GitHub tag](https://img.shields.io/github/tag/qmetry/qaf-support-galen.svg)](https://github.com/qmetry/qaf-support-galen/tags)
[![javadoc](https://javadoc.io/badge2/com.qmetry/qaf-support-galen/javadoc.svg)](https://javadoc.io/doc/com.qmetry/qaf-support-galen)
# qaf-support-galen
Galen framework support library for automated testing of look and feel for your responsive websites## Features: ##
- Ease of use
- detailed reporting
- Fail/Success element screen shot
- Multiple web platforms ui layout validation support
- CSS and broken image validataion
-
This library provides [utility methods](/src/com/qmetry/qaf/automation/support/galen/UiValidationUtils.java) for automated testing of look and feel validation for responsive websites using [galen specs](http://galenframework.com/docs/reference-galen-spec-language-guide/).## Methods:
|Method|Description|
|:------|----|
|checkLayout(String specPath)|Checks layout of the page that is currently open in current thread. Takes driver from QAFTestBase
This method uses following properties:
layoutvalidation.platforms=list of tags to be included from specification (default is desktop)
layoutvalidation.<platform>.screensize= (default is browser maximized)
layoutvalidation.platforms=desktop;tablet
layoutvalidation.tablet.screensize={'width':800,'height':750}
|checkLayout(String specPath, String... platforms)|Checks layout of the page that is currently open in current thread for given platforms.
This method uses
layoutvalidation.<platform>.screensize
property. For example, platform provided in argument are tablet and desktop than it will look for layoutvalidation.tablet.screensize
property for tablet and layoutvalidation.desktop.screensize
property for desktop|
|verifyImagesNotBroken|verifies images provided usig <img> tag on the page are not broken|
## Usage:
- Add [qaf-support-galen dependecy](https://mvnrepository.com/artifact/com.qmetry/qaf-support-galen/latest) to your project.
- Create [layout specification](http://galenframework.com/docs/reference-galen-spec-language-guide/)
- Call approprivate [utility method](/src/com/qmetry/qaf/automation/support/galen/UiValidationUtils.java)
```java
import static com.qmetry.qaf.automation.support.galen.UiValidationUtils.checkLayout;
@Test
public void validateOroductFaqPageLayout() throws IOException {
getDriver().get("/ww/en/Categories/Products/PRD-101#tab-faqs");
checkLayout("resources/ui-specs/item-support-tab.spec");
}
```
**BDD**
```
When get '/ww/en/Categories/Products/PRD-101#tab-faqs'
Then check layout using 'resources/ui-specs/item-support-tab.spec'
```
**Data-driven example:**
|recId |specs |url |
|:------|:-------|:-----|
|products faq tab|resources/ui-specs/item-support-tab.spec|/ww/en/Categories/Products/PRD-101#tab-faqs|
products accessories tab|resources/ui-specs/pdp-page.spec|/ww/en/Categories/Products/PRD-101#tab-accessories|
```
@QAFDataProvider(dataFile = "resources/data/testdata.csv")
@Test
public void validateProductPageLayout(Map data) throws IOException {
getDriver().get((String) data.get("url"));
checkLayout((String) data.get("specs"));
}
```
**BDD**
```
@dataFile:resources/data/testdata.csv
Scenario: Validate ProductPage Layout
When get '${url}'
Then check layout using '${specs}'
```