Welcome to the Ranch
You appear to be setting
actualTitle to the emty
String "" in line 18. You doubtless know already that isn't
null.
Then in line 24 you are setting it to whatever is returned from that method in
driver. That must be returning
null. Try adding
System.out.println(actualTitle); as line 25 and see whether that prints
null.
So when you get to line 30 you are calling a method on
null, which the JVM doesn't like, and its way of saying, “ouch!” is to throw an exception.
There is a trick whereby you write such calls apparently backwards, which will sort out the exception, but I think you are better off finding out why you are getting
null in line 24. I don't know how the driver gets the title, but at least the web address appears to open Mercury Tours correctly.
Since both variables appear to be String type, do you need
contentEquals() rather than plain simple
equals()?