How can I resolve my class from a different jar with same structure like another
Note : Though the jars in question contains the word
The exception tells that the required class was not found in the classpath.
As you have mentioned that you are adding PhantomJSDriver-jar as an external dependency. Make sure you have the correct scope for the jar and it is bundled when you package your application.
Refer to this question to get better understanding of the scope.