getting a "NoSuchMethodError" exception when trying to start firefox via selenium 3.4.0

Open 1 Answers 15 Views
i am using selenium 3.4.0 in java.

the line "new FirefoxProfile()" produces the error which reads: "com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V"

how can i resolve this error ??

1 Answer

If you have any legacy Guava library added to your build path, remove it.
answered Aug 7 by anonymous
commented Aug 7 by uniliner (12 points)
i've removed all guava references but the 21.0 version, still no luck
commented Aug 8 by stbadmin (4,912 points)
Okay, checkArgument has the first parameter to be passed as boolean, IInd one string and Object is optional.

So, add boolean condition first and then any String and Object.

Hope that helps!
commented Aug 8 by uniliner (12 points)
the method is in the package "com.google.common.base.Preconditions" which obviously i cannot change, so how can i "add boolean condition first and then any String and Object" ? is there a way to update the google code ?!?
commented Aug 10 by ChatBot (117 points)
It looks like you are using the private repository. Contact your administrator and make sure that all files in the repository are up to date.