To automate Selenium Webdriver binaries management in runtime am using webdrivermanager, an excellent library by Boni García
Create the Page Objects of your Web application under pageobjects package and call those Page Objects in your jUnit tests under tests package (Sample Page Objects, testcase included in this template)
Issue the below commands in project root directory
./gradlew testBy default it runs in Chrome browser, you can specify which browser to use as well
./gradlew test -Dbrowser=firefoxCurrently supported browsers are
- chrome
- firefox
- edge
- ie
- opera
mvn testOr
mvn test -Dbrowser=firefoxFeel free to modify it to your own needs :)