-
Bug
-
Resolution: Won't Do
-
Major
-
drone_2.0.0.Alpha1
-
None
I have a test case like this
@RunWith(Arquillian.class) @RunAsClient public class SomeTestCase { @Drone @Mobile @Custom private WebDriver mobile; // tests }
where @Custom is just an annotation:
@Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.FIELD, ElementType.PARAMETER }) public @interface Custom { }
it is not annotated with @Qualifier.
Realize that the same problem arise when using @OperateOnDeployment from Arquillian which is not annotated with @Qualifier neither.
I am getting this:
http://pastebin.com/raw.php?i=i9DVqeaC
You see that InstrumentationPerformDecider.decidePerformingInstrumentation observes BeforeDroneInstantiated so when it is treated twice, you are going to instantiate two Drones which is another argument why Drone does it wrong.
When I declare Drone injection like that, it results into two instances of WebDrivers so that means it instruments Android package twice with two Selendroids so that mean I am getting NoUniqueWebDriverException when I want to start some activity because from now on you have "by accident" two webdrivers instrumenting the same deployment as a result of a bug where putting custom annotation on Drone instantiates it twice.