question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PageFactory.initElements throwing java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V

See original GitHub issue

Description

Trying to get appium to click on my first iOS element in the app. I have set the right desired capabilities since the Appium Desktop is able to open the inspector. But it is throwing - INFO [IOSAppRegression:55] Step:1 Device: 5s Connecting to Device.......... Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V at io.appium.java_client.pagefactory.TimeOutDuration.setTime(TimeOutDuration.java:54) at io.appium.java_client.pagefactory.TimeOutDuration.setTime(TimeOutDuration.java:59) at io.appium.java_client.pagefactory.TimeOutDuration.<init>(TimeOutDuration.java:37) at io.appium.java_client.pagefactory.AppiumFieldDecorator.<init>(AppiumFieldDecorator.java:80) at ss.qa.test.IOSAppRegression.prepareTestBed(IOSAppRegression.java:85) at ss.qa.test.IOSAppRegression.main(IOSAppRegression.java:165)

Environment

  • java client build version or git revision if you use some shapshot: 5.0.0-BETA4
  • Appium server version or git revision if you use some shapshot: v1.6.4-beta
  • Desktop OS/version used to run Appium if necessary: macOS Sierra
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: Appium Desktop app
  • Mobile platform/version under test: iPhone 5s
  • Real device or emulator/simulator: Real device

Details

Gathering all iOS elements on the app to click on.

Code To Reproduce Issue [ Good To Have ]

I have the following set up inside a class - @iOSFindBy(id = "button_dev") // for iOS native UI private IOSElement dev_button; and the following initialization for this page - PageFactory.initElements(new AppiumFieldDecorator(driver, 15, TimeUnit.SECONDS), introScreen);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:29 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
AlekseiMordascommented, Mar 22, 2017

Did anybody find working solution?

1reaction
SrinivasanTargetcommented, Mar 4, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

5 - Stack Overflow
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;) with Selenium, gradle and ChromeDriver.
Read more >
Java.lang.NoSuchMethodError is throwing | Selenium Forum
Throwing the below error while executing the program, Attached the pom.xml file used to compile. Please help. FAILED: TestB java.lang.
Read more >
java.lang.NoSuchMethodError: com.google.common.base ...
Hi Team, I am Not able to run hive. Getting following error on hive version above 3.X, i tried all the versions. It...
Read more >
Mark as Duplicate - Issue Tracker - Google
Build fails with NoSuchMethodError:com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/ ...
Read more >
Page Object Model (POM) With Page Factory | Selenium Tutorial
#1) It is a design pattern where you have a separate Java class file corresponding to each screen or page in the application....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found