[arquillian-issues] [JBoss JIRA] (ARQGRA-393) Graphene does not handle different qualifiers for Drone instances in fragments
Stefan Miklosovic (JIRA)
jira-events at lists.jboss.org
Thu Oct 10 04:29:02 EDT 2013
Stefan Miklosovic created ARQGRA-393:
----------------------------------------
Summary: Graphene does not handle different qualifiers for Drone instances in fragments
Key: ARQGRA-393
URL: https://issues.jboss.org/browse/ARQGRA-393
Project: Arquillian Graphene
Issue Type: Bug
Affects Versions: 2.0.0.CR2
Reporter: Stefan Miklosovic
The issue is that when I have two Drones in abstract class
{code}
@Drone
@Browser
WebDriver browser;
@Drone
@Mobile
WebDriver mobile;
{code}
and some fragment in another class
{code}
public class LoginFragment {
@Root
private WebElement root;
@Drone
@Browser
private WebDriver browser;
@FindBy(id = "login-username")
private WebElement usernameField;
@FindBy(id = "login-password")
private WebElement passwordField;
@FindBy(id = "login-submit")
private WebElement loginButton;
public void writeUsername(String username) {
usernameField.sendKeys(username);
}
public void writePassword(String password) {
passwordField.sendKeys(password);
}
public void submitForm() {
loginButton.click();
Graphene.waitModel(browser).until().element(root).is().not().visible();
}
}
{code}
and I have a test in class which extends the abstract one
{code}
public class SomeClass extends AbstractSomeClass {
@FindBy(id = "login-box")
private LoginFragment loginFragment;
@Test
@InSequence(1)
@OperateOnDeployment("some-deployment")
public void loginUserInWebClient(@ArquillianResource URL context) {
openWebPageUrl(context);
loginFragment.writeUsername("john");
}
}
{code}
I get this:
loginUserInWebClient(some class): There is no context available for qualifier org.jboss.arquillian.drone.api.annotation.Default. Available contexts are [interface x.y.z.Browser, interface x.y.z.Mobile].
The workaround is to have one injection of Drone without any qualifier, so when I just remove @Browser annotation completely from everywhere, it is ok.
This restriction is kind of ... interesting. Maybe I do not know how to set up that context on my own but according to various people as [~jhuska] it is considered to be a bug.
--
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