/SelenideClass

Selenide simple example for Web Automation

Primary LanguageJava

Java project for Desktop Web Automation

Clone the project

  • Copy the link that is indicated under clone or download button, you can choose the https one.
  • go to your intellij and choose File - New - Project from Version Control - Git
  • Put the link and follow the instructions

Running this project through terminal

  • Navigate to project root folder ./SelenideClass
  • run the following command:
    mvn clean test

In order to run specific test cases from your feature files:

1- First put a tag in your desired scenario:

Feature: automation practice landing page

  Background: open landing page
    Given I am in landing page

  Scenario: landing page is shown correctly
    Then I check that landing page is shown correctly
    
  @TestTag  
  Scenario: landing page is shown correctly
    Then I check that landing page is shown correctly

2- Go to src/java/testRunners/TestRunner.java and put, in cucumber options the tag:

...
@CucumberOptions(
        features = {"src/test/resources/features"},
        plugin = {"pretty", "io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm", "html:target" +
                "/cucumber-reports/report.html"},
        glue = "stepDefinitions",
        tag = {"@TestTag"}
)
...

Windows Users:

1- Go to src\java\testRunners\TestRunner.java and change the path to comply with windows:

...
@CucumberOptions(
        features = {"src\\test\\resources\\features"},
        plugin = {"pretty", "io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm", "html:target" +
                "\\cucumber-reports\\report.html"},
        glue = "stepDefinitions"
)
...