This error is just bizarre, my code compiles fine, I can see there are no problems with it, yet this error has just popped up. I have tried re-starting NetBeans and there is
It's caused by NetBeans retaining some of the old source and/or compiled code in its cache and not noticing that e.g. some of the code's dependencies (i.e. referenced packages) have changed, and that a proper refresh/recompile of the file would be in order.
The solution is to force that refresh by either:
a) locating & editing the offending source file to force its recompilation (e.g. add a dummy line, save, remove it, save again),
b) doing a clean build (sometimes will work, sometimes won't),
c) disabling "Compile on save" (not recommended, since it can make using the IDE a royal PITA), or
d) simply remove NetBeans cache by hand, forcing the recompilation.
As to how to remove the cache:
If you're using an old version of NetBeans:
.netbeans/6.9/var/cache/index/
(replace 6.9 with your version).If you're using a newer one:
AppData/Local/NetBeans/Cache/8.1/index/
(replace 8.1 with your version).The paths may vary a little e.g. on different platforms, but the idea is still the same.
Add selenium-server-standalone-3.4.0.jar. It works to me. Download Link
Recheck the package declarations in all your classes!
This behaviour has been observed in NetBeans, when the package declaration in one of the classes of the package refers to a non-existent or wrong package. NetBeans normally detects and highlights this error but has been known to fail and misleadingly report the package as free of errors when this is not the case.