Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget class cannot be in Groovy #340

Closed
aznime opened this issue Mar 15, 2016 · 8 comments
Closed

Widget class cannot be in Groovy #340

aznime opened this issue Mar 15, 2016 · 8 comments
Labels
Milestone

Comments

@aznime
Copy link

aznime commented Mar 15, 2016

Description

When creating a widget, code must be in Java. An illegal access exception is thrown if it is coded in Groovy.

Environment

  • java client build version or git revision if you use some shapshot: 3.3.0
  • Appium server version or git revision you is use some shapshot: 1.14.16
  • Desktop OS/version used to run Appium if necessary: OSX El Capitan (10.11.1)
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 0.12.7
  • Mobile platform/version under test: iOS 9.2
  • Real device or emulator/simulator: Simulator

Exception stacktraces

https://gist.github.com/aznime/54263754d2a312ffb1bc

@TikhomirovSergey
Copy link
Contributor

@aznime
Could you share a gist with code of this class?
com.jumbo.shared.widgets.PlayWidget

It looks like a bug but I don't know how to reproduce it. Java client widget tests use objects with protected constructors and private/protected fields which are populated and everything is ok.

@TikhomirovSergey
Copy link
Contributor

@aznime
Also.
How should I check it? Have you a Groovy project?

@aznime
Copy link
Author

aznime commented Mar 16, 2016

Sorry for the late reply. I was trying to create a demo project for this purpose.

You can find it here: https://github.com/aznime/jumbo-mobile-tests

@TikhomirovSergey
Copy link
Contributor

@aznime
Thank you. I've started to search for the root cause of the error.

@TikhomirovSergey
Copy link
Contributor

@aznime
Ok. It seems I know the root cause. I think that cglib and reflection are not used properly at some cases and I'm going to fix it.

As a workaround I can advice you to change class modifiers to public.

public class UICatalogWidget extends Widget {
...
}

Can you do it and send a message about the result.

@aznime
Copy link
Author

aznime commented Mar 18, 2016

@TikhomirovSergey
I got the same exception after explicitly using the public modifier.

@TikhomirovSergey
Copy link
Contributor

@aznime
The fix is going to be included at 3.4.1 very soon!

@TikhomirovSergey
Copy link
Contributor

The fix has been merged and it is going to be published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants