I have a very strange situation, I have created Features
and Scenarios
in the feature file and corresponding step definitions and methods in the separate class.
I have run tests by running a feature file, and everything was fine, all tests were green.
But, when I run tests from TestRunner
class, I got the following message:
Undefined step: Given I am on the Facebook Login page and suggested code.
You can implement missing steps with the snippets below:
@Given("^I am on the Facebook Login page$")
public void i_am_on_the_Facebook_Login_page() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
I have noticed that the suggested method have underscore:
(i_am_on_the_Facebook_Login_page())
but my methods do not have underscore
(iAmOnTheFacebookLoginPage())
Does anybody have an idea why this happens? I can't run tests now even from the feature file.
Recently, I have started using Mac and IntelliJ instead of Windows and Eclipse.
Is it possible that IntelliJ causes the problem? P.S. I have used the option "Create step definition" from IntelliJ