[arquillian-issues] [JBoss JIRA] (ARQGRA-412) Injection @Drone WebDriver into fragment doesn't respect qualifier annotation on fragment field

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Thu Nov 14 08:39:06 EST 2013


     [ https://issues.jboss.org/browse/ARQGRA-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukáš Fryč updated ARQGRA-412:
------------------------------

    Fix Version/s: 2.0.1.Final

    
> Injection @Drone WebDriver into fragment doesn't respect qualifier annotation on fragment field
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARQGRA-412
>                 URL: https://issues.jboss.org/browse/ARQGRA-412
>             Project: Arquillian Graphene
>          Issue Type: Bug
>    Affects Versions: 2.0.0.Final
>            Reporter: Jan Dosoudil
>             Fix For: 2.0.1.Final
>
>
> It's related to ARQGRA-393, but I think it's another problem.
> {code:title=Sample testcase}
> @RunWith(Arquillian.class)
> @WarpTest
> @RunAsClient
> class Test {
> 	@Drone @First
> 	private WebDriver browser1;
> 	@FindBy(id="id") @First
> 	private Fragment fragment1;
> 	@Drone @Second
> 	private WebDriver browser2;
> 	@FindBy(id="id") @Second
> 	private Fragment fragment2;
> }
> {code}
> {code:title=Sample fragment}
> class Fragment {
> 	@Drone
> 	private WebDriver browser;
> }
> {code}
> {code:title=Exception}
> Caused by: java.lang.IllegalArgumentException: Retrieved a null from context, which is not a valid Drone browser object
> 	at org.jboss.arquillian.drone.impl.Validate.notNull(Validate.java:42)
> 	at org.jboss.arquillian.drone.impl.DroneTestEnricher.getDroneInstance(DroneTestEnricher.java:107)
> 	at org.jboss.arquillian.drone.impl.DroneTestEnricher.enrich(DroneTestEnricher.java:72)
> 	at org.jboss.arquillian.graphene.enricher.AbstractSearchContextEnricher.enrichRecursively(AbstractSearchContextEnricher.java:70)
> 	at org.jboss.arquillian.graphene.enricher.PageFragmentEnricher.createPageFragment(PageFragmentEnricher.java:156)
> 	... 71 more
> {code}
> If I removed @First annotations at all, It seems to run OK but in fragment annotated with @Second is injected default WebDriver.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the arquillian-issues mailing list