1

I have a problem with my framework. When I try to run that it fails and I do not know where the problem is coming from. screenshot.

My runner class is as follows;

 @RunWith(Cucumber.class)
    @CucumberOptions(
            plugin = {"json:target/cucumber.json",
                    "html:target/default-html-reports",
                    "rerun:target/rerun.txt"},
            features = "src/test/resources/features",
            glue = "com/demo/step_definitions",
            //strict = true,
            dryRun = false,
            tags = "@requestDemo"
    )
    public class cukesRunner {
}

My hook class is as follows;

 @Before
    public void setUp() {
        System.out.println("\tthis is coming from BEFORE");
        Driver.get().manage().window().maximize();
        Driver.get().manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
        Driver.get().get(ConfigurationReader.get("login_url"));
    }

    @After
    public void tearDown(Scenario scenario) {
        if (scenario.isFailed()) {
            final byte[] screenshot = ((TakesScreenshot) Driver.get()).getScreenshotAs(OutputType.BYTES);
            scenario.attach(screenshot, "image/png", "screenshot");
        }

        Driver.closeDriver();
    }
    }

Your help will be appreciated.

Thank you.

Besiktas
  • 19
  • 2
  • Does this answer your question? [Cant run feature in Cucumber](https://stackoverflow.com/questions/25847343/cant-run-feature-in-cucumber) Scroll down to some of the newer answers, you likely have a dependency mismatch. – sorifiend Oct 11 '21 at 04:34

0 Answers0