I'm trying to test a simple Junit using selenium to load firefox browser for a particular website, and I have added all required jar files. The webdriver version 2.53.1 and ff version 47.0.1 but I got the error as java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkPositionIndex(II)I, to resolve this added com.google.guava jar file but I couldn't find anything...Please help me anyone.
Asked
Active
Viewed 373 times
1
-
Try this: https://stackoverflow.com/questions/35186/how-do-i-fix-a-nosuchmethoderror – nCessity Jun 16 '17 at 10:41
-
@bhavya Can you consider showcasing your work please? Thanks – undetected Selenium Jun 16 '17 at 12:20
-
@nCessity , It's not working after I added jars in proper way and I'm doing this in eclipse – bhavya Jun 16 '17 at 14:51
-
@bhavya, eclipse, that is important information. Please include something like that it in your future questions. Follow-ups: 1) How do you manage your dependencies (e.g with Maven?)? 2) Are you getting these errors when running your JUnit in eclipse or from command line? – nCessity Jun 16 '17 at 15:14
-
@nCessity Thank You and yes it is, I'm running it for Junit in eclipse – bhavya Jun 16 '17 at 15:19
-
@bhavya Ok, eclipse is a complex thing. We only can try out different things. Firstly, clean up your project. Click Project -> Clean... Then run your tests again and tell us how it went... – nCessity Jun 16 '17 at 15:25
-
@nCessity cleaned a project and also removed some duplicate jar, now it's opening a browser but not loading a website ans showing this error "com.google.common.collect.Multimaps.transformValues(Lcom/google/common/collect/ListMultimap;Lcom/google/common/base/Function;)Lcom/google/common/collect/ListMultimap;" – bhavya Jun 16 '17 at 15:45
-
@nCessity, It's worked out. I removed some duplicate jar files which are already available in guava jar latest version and now it's loading everything. Thank You for your reply. – bhavya Jun 16 '17 at 16:20
-
@DebanjanB Hi, Thank You for reply. It's worked out. – bhavya Jun 16 '17 at 16:21