java-client: PageFactory.initElements throwing java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V
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);
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 29 (15 by maintainers)
Commits related to this issue
- Merge pull request #589 from TikhomirovSergey/master #588 FIX — committed to appium/java-client by TikhomirovSergey 7 years ago
Did anybody find working solution?
+1 @TikhomirovSergey