Reputation: 183
In Hooks.java after changing imports from
//import cucumber.api.java.After;
//import cucumber.api.java.Before;
To:
import io.cucumber.java.*;
Seeing below error for the piece of code:
@After({"@Phase1, @Phase2, @Phase3"})
Illegal initializer for 'java.lang.String'
Upvotes: 1
Views: 1538
Reputation: 12039
Conditional hooks use a tag expression which is a single string. So you have to use @After("@Phase1 or @Phase2 or @Phase3")
.
Upvotes: 3