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.