I implemented this code (Bob’s excellent HighlightElement code), but it would throw errors when running multiple tests in a test suite. I’d see an error
at com.reusableComponents.HighlightElement.invokeMethod
…
java.lang.AssertionError: Session ID is null. Using WebDriver after calling quit()?
I modified Bob’s code according to this suggestion, moving the actual getWebDriver call deeper in:
Getting the driver each time might be less efficient, but it definitely stopped my errors.