• Just as we ANDed and ORed the Tags, same way we can AND and OR the combination of Tags and Hooks. Consider a situation where we need to perform certain Steps for Features, such as for feature1 and feature2 but not for other Features.
• OR: The Hooks code will be run when either of the mentioned Tags is associated with the Scenario. Tags are passed in a String and are comma separated.
For example: • @Before("@sanity,@wip")
• AND: The Hooks code will be run when all the mentioned Tags are associated with the Scenario. Tags are passed as separate Tag Strings.
• @Before({"@sanity","@regression"})
• NOT: The Hooks code will be run when all of the mentioned Tags are not associated with the Scenario. Tags are passed as separate Tag Strings.
• @Before({"@important","~@regression"})