You cannot combine Junit
annotations with Cucumber
annotations. I suggest you to remove @Test
annotation. You should rather write a step to launch the site and implement it. For example put this at the top of your scenario,
Given I navigate to "http://www.careerbuilder.com"
This will translate to a step like,
@Given("^I navigate to \"([^\"]*)\"$")
public void I_navigate_to_site(String url) throws Throwable {
driver = new FirefoxDriver();
driver.navigate().to(url);
}