[
https://issues.jboss.org/browse/ARQGRA-165?page=com.atlassian.jira.plugin...
]
Lukáš Fryč updated ARQGRA-165:
------------------------------
Description:
For creating Java-to-JavaScript calling interface, you need to use call
{{JSInterfaceFactory.create(JavaScriptInterfaceToCreate.class)}}.
This is not really handy for direct usage:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@Test
public void test() throws InterruptedException {
RequestGuard guard = JSInterfaceFactory.create(RequestGuard.class);
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
Let's implement test case enrichment, similarly as we did with @FindBy.
You can re-use annotation @JavaScript:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@JavaScript
// or @ArquillianResource
RequestGuard guard;
@Test
public void test() throws InterruptedException {
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
This injection should work also in component objects.
was:
For creating Java-to-JavaScript calling interface, you need to use call
{{JSInterfaceFactory.create(JavaScriptInterfaceToCreate.class)}}.
This is not really handy for direct usage:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@Test
public void test() throws InterruptedException {
RequestGuard guard = JSInterfaceFactory.create(RequestGuard.class);
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
Let's implement test case enrichment, similarly as we did with @FindBy.
You can re-use annotation @JavaScript:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@JavaScript
RequestGuard guard;
@Test
public void test() throws InterruptedException {
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
This injection should work also in component objects.
JSInterfaceFactory test case enrichment
---------------------------------------
Key: ARQGRA-165
URL:
https://issues.jboss.org/browse/ARQGRA-165
Project: Arquillian Graphene
Issue Type: Feature Request
Affects Versions: 2.0.0.Alpha2
Reporter: Lukáš Fryč
Assignee: Jan Papousek
Priority: Minor
Fix For: 2.0.0.Alpha3
For creating Java-to-JavaScript calling interface, you need to use call
{{JSInterfaceFactory.create(JavaScriptInterfaceToCreate.class)}}.
This is not really handy for direct usage:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@Test
public void test() throws InterruptedException {
RequestGuard guard = JSInterfaceFactory.create(RequestGuard.class);
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
Let's implement test case enrichment, similarly as we did with @FindBy.
You can re-use annotation @JavaScript:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@JavaScript
// or @ArquillianResource
RequestGuard guard;
@Test
public void test() throws InterruptedException {
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
This injection should work also in component objects.
--
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