[arquillian-issues] [JBoss JIRA] (ARQGRA-439) Infer WebDriver context for @FindBy injections when there is only one qualified browser
Juraj Húska (JIRA)
issues at jboss.org
Tue May 6 12:05:57 EDT 2014
Juraj Húska created ARQGRA-439:
----------------------------------
Summary: Infer WebDriver context for @FindBy injections when there is only one qualified browser
Key: ARQGRA-439
URL: https://issues.jboss.org/browse/ARQGRA-439
Project: Arquillian Graphene
Issue Type: Feature Request
Components: core, ftest
Affects Versions: 2.0.2.Final
Reporter: Juraj Húska
When one is using qualified {{WebDriver}} instances, he needs to annotate also his {{WebElement}}, ... to distinguish in which context those elements should be resolved.
This has to be done also when there is only one (though qualified) browser injected.
Suppose:
{code}
@RunWith(Arquillian.class)
public class GrapheneBugDroneTest {
@Drone
@BugReport
WebDriver driver;
@Deployment(testable = false)
public static Archive<?> deployHtml5DemoApp() {
return Deployments.createDeployment();
}
@ArquillianResource
URL url;
@FindBy(id = "name")
@BugReport
WebElement nameField;
@Test
public void addUser() throws Exception {
driver.get(url.toString());
Graphene.waitGui(driver).until().element(nameField).is().present();
Assert.assertTrue(true);
}
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public static @interface BugReport {
}
}
{code}
Graphene can interfere which {{WebDriver}} instance was injected and act accordingly. The idea is also described [here|https://issues.jboss.org/browse/ARQGRA-435?focusedCommentId=12965697&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12965697].
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
More information about the arquillian-issues
mailing list