The rst thing to do is to relax; stack traces have a lot of information but they are actually really friendly and helpful things. Let's modify our project to produce a stack trace and work through it. We are going to make a small change to the getDriver() method in DriverFactory to force it to always return a null, as follows:
public static WebDriver getDriver() { return null;
}
This is going to make sure that we never return a driver object, something that we would expect to cause errors. Let's run our tests again, but make sure that Maven displays a stack trace by using the –e switch:
mvn clean install -e
This time you should see a couple of stack traces output to the terminal; the rst one should look like this:
Comments
0 comments
Please sign in to leave a comment.