-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
OverrideWidget annotation does not work due to InstantiationException with error "SomeClass is abstract so it can't be instantiated" #392
Comments
According to this page-object doc section "what-if-interaction-with-a-widget-has-special-details-for-each-used-platform-but-the-same-at-high-level". It seems that it's the restriction of |
After I followed the instruction in section what-if-interaction-with-a-widget-has-special-details-for-each-used-platform-but-the-same-at-high-level": |
I do not know the According to the document mentioned above, an abstract widget class should be the correct way to use |
After several trace, I think I know the root cause: |
Yes. I was apble to reproduce that issue. I'm going to fix it ASAP. |
Description
Use a abstract widget class and two subclass to implement android and iOS widgets in Page Objects. But it would fail to init the PageObjects with exception:
java.lang.IllegalArgumentException: java.lang.InstantiationException: com.foobar.uitest.widgets.TheAbastractCellWidget is abstract so it can't be instantiated
Environment
Details
Scenario:
TheAbastractCellWidget
is the abstract Widget class,AndroidCellWidget
is the Android implementation of it andIOSCellWidget
is the iOS implementation.This code is put in a page object class
FooPage
I debugged the code, it seems that
buildDefaultBy()
method in classWidgetByBuilder
startedWhatIsNeeded.DEFAULT_OR_HTML
type widget initialization before OverrideWidget mechanism and then it threw exeception.Code To Reproduce Issue [ Good To Have ]
n/a
Ecxeption stacktraces
Link to Appium logs
no need
The text was updated successfully, but these errors were encountered: