Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/osandadeshan/gauge-selenium-java-web-ui-automation
A demo project that automates all web browsers using Selenium and Gauge in Java.
https://github.com/osandadeshan/gauge-selenium-java-web-ui-automation
cross-browser cross-platform gauge java page-factory selenium webdrivermanager
Last synced: about 19 hours ago
JSON representation
A demo project that automates all web browsers using Selenium and Gauge in Java.
- Host: GitHub
- URL: https://github.com/osandadeshan/gauge-selenium-java-web-ui-automation
- Owner: osandadeshan
- Created: 2018-08-26T11:02:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T11:34:07.000Z (7 months ago)
- Last Synced: 2024-05-02T07:21:55.562Z (7 months ago)
- Topics: cross-browser, cross-platform, gauge, java, page-factory, selenium, webdrivermanager
- Language: Java
- Homepage:
- Size: 932 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gauge Selenium Java Web UI Automation
This project serves as a boilerplate for automating web applications across various browsers and environments using Gauge and Selenium.
[![Gauge Selenium Java Web UI Automation CI](https://github.com/osandadeshan/gauge-selenium-java-web-ui-automation/actions/workflows/gauge-selenium-java-ci.yml/badge.svg)](https://github.com/osandadeshan/gauge-selenium-java-web-ui-automation/actions/workflows/gauge-selenium-java-ci.yml)
## Pre-requisites
1. Java
2. Maven## How to install Gauge core
Follow the instructions mentioned in [Installing Gauge](https://docs.gauge.org/getting_started/installing-gauge?os=windows&language=java&ide=vscode) in the official [Gauge Documentation](https://docs.gauge.org/)## How to install Gauge plugins
1. Open Command Prompt and execute following commands.
`gauge install java`
`gauge install html-report`
`gauge install json-report`
`gauge install xml-report`
`gauge install spectacle`
`gauge install flash`2. You can check the installation using the following command.
`gauge -v`**Note:**
If the installation is success, it will output like this:```markdown
Gauge version:
Plugins
-------
flash ()
html-report ()
java ()
json-report ()
spectacle ()
xml-report ()
```## Executing specifications
### General specs execution
- Run the below command to execute all specifications in `specs` directory```
mvn gauge:execute -DspecsDir=specs
```- Run the below command to execute a single specification
```
mvn gauge:execute -DspecsDir=specs/example.spec
```- Run the below command to execute specifications in `specs` and `specDir` directories
```
mvn gauge:execute -DspecsDir="specs,specDir"
```- Run the below command to execute the failed scenarios
```
mvn gauge:execute -Dflags="--failed"
```- Run the below command to execute the repeat scenarios
```
mvn gauge:execute -Dflags="--repeat"
```**Note:**
`mvn test-compile` should be used for the tool to get latest changes of user code.### Execute specs In parallel
```
mvn gauge:execute -DspecsDir=specs -DinParallel=true
```### Execute specs by tags expression
```
mvn gauge:execute -DspecsDir=specs -Dtags="!in-progress"
```### Execute spec by scenario name
```
mvn gauge:execute -DspecsDir=specs -Dscenario="Scenario Name"
```### Specifying execution environment
```
mvn gauge:execute -DspecsDir=specs -Denv="dev"
```### Execute specs as a part of maven test phase
Run gauge specs in project as a part of maven test phase by adding the below execution to yor pom.xml
```
com.thoughtworks.gauge.maven
gauge-maven-plugin
1.6.1
test
specs
value
execute
````mvn test` command will also run gauge specs if the above mentioned execution is added to the projects pom.xml
### Validate specs in project
- Run the below command to execute all specifications in `specs` directory
```
mvn gauge:validate -DspecsDir=specs
```- Run the below command to validate and ignore stub implementation suggestions
```
mvn gauge:validate -Dflags="--hide-suggestion"
```### Execute specs as a part of maven test-compile phase
Validate gauge specs in project as a part of maven test-compile phase by adding the below execution to yor pom.xml
```
com.thoughtworks.gauge.maven
gauge-maven-plugin
1.6.1
test-compile
specs
--hide-suggestion
validate
```### Running both validate and execute goals as part of maven
Add the following execution to pom.xml to run both goals:
```
com.thoughtworks.gauge.maven
gauge-maven-plugin
1.6.1
validate
test-compile
validate
execute
test
execute
specs
```
### All Properties
The following plugin properties can be additionally set:
| Property name | Usage | Description |
|---------------|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| specsDir | -DspecsDir=specs | Gauge specs directory path. Required for executing specs. Takes a comma separated list of specification files/directories |
| tags | -Dtags="tag1 & tag2" | Filter specs by specified tags expression |
| inParallel | -DinParallel=true | Execute specs in parallel |
| nodes | -Dnodes=3 | Number of parallel execution streams. Use with `parallel` |
| env | -Denv=qa | gauge env to run against |
| flags | -Dflags="--verbose,--simpleConsole" | Add additional gauge flags to execution |## Internet Explorer 11 configurations for a Windows machine
1. Open "**Registry Editor**" (Windows Key + R → Type regedit → Press Enter).
2. For 32-bit Windows installations, the key you must examine in the registry editor is
`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE`
3. For 64-bit Windows installations, the key is
`HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE`
4. Please note that the "**FEATURE_BFCACHE**" sub key may or may not be present, and should be created if it is not present.
5. Inside this key, create a "**DWORD**" value named "**iexplore.exe**" with the value of "**0**".
6. Go to "**Internet Options**" on Internet Explorer.
7. Go to "**Security**" tab.
8. Check "**Enable Protected Mode**" for all zones (Internet, Local intranet, Trusted sites and Restricted sites).
9. Click on "**Apply**" button.
10. Click on "**OK**" button.**Note:**
Tested using a **Windows 10 Core i7 Machine**.