https://github.com/sridharbandi/selenium-testng-template
Selenium TestNG Template, Compatible with Maven or Gradle
https://github.com/sridharbandi/selenium-testng-template
java page-object-model selenium selenium-java selenium-webdriver testng webdrivermanager
Last synced: 4 months ago
JSON representation
Selenium TestNG Template, Compatible with Maven or Gradle
- Host: GitHub
- URL: https://github.com/sridharbandi/selenium-testng-template
- Owner: sridharbandi
- Created: 2019-01-26T20:44:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-26T21:35:05.000Z (over 6 years ago)
- Last Synced: 2025-03-04T00:44:56.299Z (7 months ago)
- Topics: java, page-object-model, selenium, selenium-java, selenium-webdriver, testng, webdrivermanager
- Language: Java
- Size: 56.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Selenium TestNG Template with Gradle or Maven as build tools to getting started with
To automate [Selenium Webdriver](https://docs.seleniumhq.org/projects/webdriver/) binaries management in runtime am using [webdrivermanager](https://github.com/bonigarcia/webdrivermanager), an excellent library by [Boni García](https://github.com/bonigarcia)
### How to use?
Create the Page Objects of your Web application under **_pageobjects_** package and call those Page Objects in your TestNG tests under **_tests_** package (Sample Page Objects, testcase included in this template)### How to run?
Issue the below commands in project root directory
##### Gradle
```javascript
./gradlew test
```
By default it runs in Chrome browser, you can specify which browser to use as well
```javascript
./gradlew test -Dbrowser=firefox
```
>If you're on Windows replace `./gradlew` with `gradlew.bat`Currently supported browsers are
* chrome
* firefox
* edge
* ie
* opera##### Maven
```javascript
mvn test
```
Or
```javascript
mvn test -Dbrowser=firefox
```
> Feel free to modify it to your own needs :)