[
https://issues.jboss.org/browse/ARQGRA-439?page=com.atlassian.jira.plugin...
]
Lukáš Fryč commented on ARQGRA-439:
-----------------------------------
What do you think about prototyping this in 2.1 branch and if the complexity of the fix
will be low, we can include it in 2.0 as well?
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
Fix For: 2.1-Tracking
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...].
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)