[arquillian-issues] [JBoss JIRA] (ARQGRA-412) Injection @Drone WebDriver into fragment doesn't respect qualifier annotation on fragment field
Jan Dosoudil (JIRA)
jira-events at lists.jboss.org
Thu Nov 14 06:43:05 EST 2013
Jan Dosoudil created ARQGRA-412:
-----------------------------------
Summary: 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
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