Update webdriver for Selenium
- Find out Browser Version
- Download suitable WebDriver for Chrome or Firefox
- Put the webdriver into
src/test/resources
- Maybe you need to make the WebDriver-File executable
For Safari you need to find /usr/bin/safaridriver
on your mac and execute safaridriver --enable
- Change the webdriver initialization in
WebDriverWrapper.java
new ChromeDriver()
(using chromedriver)new FirefoxDriver()
(using geckodriver)new SafariDriver()
(using safaridriver)
Running Cucumber Tests
- From inside the IDE:
RunAllFeatures.java
as JUnit-Test - From inside the console:
./gradlew
orgradlew.bat
Ignoring Cucumber Tests
- Use the tag
@ignore
in the feature file, so that a scenario is not executed. You can specifiy your own tags- in the
build.gradle
and - in the
RunAllFeatures.java
- in the
Generating Cucumber Reports
- Cucumber reports are generated.
- If a scenario fails, a screenshot of the current webpage is embeded into the report. See in
Hooks.java
at@After
. - For changing, if reports should be generated when running from
- console, look in
build.gradle
at'--plugin' = 'html:...'
- within the IDE, look in
RunAllFeatures.java
at@CucumberOptions
- console, look in
- Eclipse
- Install Eclipse Cucumber Plugin via Eclipse Marketplace
- Convert project nature to Cucumber project nature: Configure => "Convert to Cucumber Project"
- IntelliJ
- Install Cucumber for Java