[JBoss JIRA] (ARQGRA-232) Enriched WebElement cannot be converted to JSON without manual unwrapping
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-232?page=com.atlassian.jira.plugin... ]
Lukáš Fryč resolved ARQGRA-232.
-------------------------------
Resolution: Done
> Enriched WebElement cannot be converted to JSON without manual unwrapping
> -------------------------------------------------------------------------
>
> Key: ARQGRA-232
> URL: https://issues.jboss.org/browse/ARQGRA-232
> Project: Arquillian Graphene
> Issue Type: Bug
> Reporter: Jiří Štefek
> Assignee: Lukáš Fryč
> Priority: Minor
> Fix For: 2.0.0.Alpha3
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> When you use something like this, WebElementToJsonConverter cannot convert enriched input:
> {code}
> @FindBy(css="input[id$=input]")
> WebElement input;
> public void blurInput(){
> JavascriptExecutor js = (JavascriptExecutor) GrapheneContext.getProxy();
> >>> js.executeScript("jQuery(arguments[0]).trigger('blur')", input); <<<
> }
> {code}
> error:
> {code}
> java.lang.IllegalArgumentException: Argument is of an illegal type: $Proxy37
> at org.openqa.selenium.remote.internal.WebElementToJsonConverter.apply(WebElementToJsonConverter.java:78)
> at com.google.common.collect.Iterators$8.next(Iterators.java:730)
> at com.google.common.collect.Lists.newArrayList(Lists.java:136)
> at com.google.common.collect.Lists.newArrayList(Lists.java:117)
> at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:437)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:200)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:134)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:164)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.intercept(GrapheneProxyHandler.java:172)
> at org.openqa.selenium.firefox.FirefoxDriver$$EnhancerCGLIB$$cd9d0009.executeScript(<generated>)
> {code}
> Missing some interface in created proxy?
--
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
13 years, 3 months
[JBoss JIRA] (ARQGRA-227) Support for injecting common Selenium resources: JavaScriptExecutor, Actions, Capabilities, etc.
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-227?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-227:
------------------------------
Summary: Support for injecting common Selenium resources: JavaScriptExecutor, Actions, Capabilities, etc. (was: Support for injecting Actions builder)
> Support for injecting common Selenium resources: JavaScriptExecutor, Actions, Capabilities, etc.
> ------------------------------------------------------------------------------------------------
>
> Key: ARQGRA-227
> URL: https://issues.jboss.org/browse/ARQGRA-227
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha3
>
>
> http://code.google.com/p/selenium/wiki/AdvancedUserInteractions
--
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
13 years, 3 months
[JBoss JIRA] (ARQ-1255) Multiple deployments is not working in Weld SE container
by Antonin Stefanutti (JIRA)
[ https://issues.jboss.org/browse/ARQ-1255?page=com.atlassian.jira.plugin.s... ]
Antonin Stefanutti updated ARQ-1255:
------------------------------------
Attachment: pom.xml
Bean1.java
Bean2.java
MultipleDeploymentArquilianCdiTest.java
OperateOnDeploymentArquilianCdiTest.java
test_case_1_stacktrace.txt
test_case_2_stacktrace.txt
> Multiple deployments is not working in Weld SE container
> --------------------------------------------------------
>
> Key: ARQ-1255
> URL: https://issues.jboss.org/browse/ARQ-1255
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Weld Containers
> Affects Versions: 1.0.0.CR5
> Reporter: Antonin Stefanutti
> Attachments: Bean1.java, Bean2.java, MultipleDeploymentArquilianCdiTest.java, OperateOnDeploymentArquilianCdiTest.java, pom.xml, test_case_1_stacktrace.txt, test_case_2_stacktrace.txt
>
>
> As described in [Multiple Deployments|https://docs.jboss.org/author/display/ARQ/Multiple+Deployments], multiple {{@Deployment}} annotated methods can be declared in a test class. In addition, the {{@OperateOnDeployment}} annotation enables the selection of a particular _deployment_ per test method.
> However, when using Arquillian with a Weld SE container, the CDI container isn't deployed with the expected archives which ends up having {{DeploymentException}} thrown, as illustrated in the test cases below:
> *Test case 1:*
> {code}
> @RunWith(Arquillian.class)
> public class MultipleDeploymentArquilianCdiTest {
> @Inject
> private Bean1 bean1;
> @Inject
> private Bean2 bean2;
> @Deployment(name = "bean1-jar")
> public static Archive<?> createBean1Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Deployment(name = "bean2-jar")
> public static Archive<?> createBean2Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Test
> public void multiDeploymentTest() {
> assertNotNull(bean1);
> assertNotNull(bean2);
> }
> }
> {code}
> *Test case 2:*
> {code}
> @RunWith(Arquillian.class)
> public class OperateOnDeploymentArquilianCdiTest {
> @Inject
> private Bean1 bean1;
> @Inject
> private Bean2 bean2;
> @Deployment(name = "beans-jar")
> public static Archive<?> createBeansJar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Deployment(name = "bean1-jar")
> public static Archive<?> createBean1Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Deployment(name = "bean2-jar")
> public static Archive<?> createBean2Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Test
> @OperateOnDeployment("beans-jar")
> public void singleDeploymentTest() {
> assertNotNull(bean1);
> assertNotNull(bean2);
> }
> }
> {code}
> In both cases, the following exception is thrown:
> {code}
> org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bean2] with qualifiers [@Default] at injection point [[field] @Inject private arquillian.test.OperateOnDeploymentArquilianCdiTest.bean2]
> {code}
> Note that test case 2 is working when only {{@Deployment(name = "beans-jar")}} is declared.
> Test classes and the {{pom.xml}} are attached.
--
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
13 years, 3 months
[JBoss JIRA] (ARQ-1255) Multiple deployments is not working in Weld SE container
by Antonin Stefanutti (JIRA)
Antonin Stefanutti created ARQ-1255:
---------------------------------------
Summary: Multiple deployments is not working in Weld SE container
Key: ARQ-1255
URL: https://issues.jboss.org/browse/ARQ-1255
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Weld Containers
Affects Versions: 1.0.0.CR5
Reporter: Antonin Stefanutti
As described in [Multiple Deployments|https://docs.jboss.org/author/display/ARQ/Multiple+Deployments], multiple {{@Deployment}} annotated methods can be declared in a test class. In addition, the {{@OperateOnDeployment}} annotation enables the selection of a particular _deployment_ per test method.
However, when using Arquillian with a Weld SE container, the CDI container isn't deployed with the expected archives which ends up having {{DeploymentException}} thrown, as illustrated in the test cases below:
*Test case 1:*
{code}
@RunWith(Arquillian.class)
public class MultipleDeploymentArquilianCdiTest {
@Inject
private Bean1 bean1;
@Inject
private Bean2 bean2;
@Deployment(name = "bean1-jar")
public static Archive<?> createBean1Jar() {
return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Deployment(name = "bean2-jar")
public static Archive<?> createBean2Jar() {
return ShrinkWrap.create(JavaArchive.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Test
public void multiDeploymentTest() {
assertNotNull(bean1);
assertNotNull(bean2);
}
}
{code}
*Test case 2:*
{code}
@RunWith(Arquillian.class)
public class OperateOnDeploymentArquilianCdiTest {
@Inject
private Bean1 bean1;
@Inject
private Bean2 bean2;
@Deployment(name = "beans-jar")
public static Archive<?> createBeansJar() {
return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Deployment(name = "bean1-jar")
public static Archive<?> createBean1Jar() {
return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Deployment(name = "bean2-jar")
public static Archive<?> createBean2Jar() {
return ShrinkWrap.create(JavaArchive.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Test
@OperateOnDeployment("beans-jar")
public void singleDeploymentTest() {
assertNotNull(bean1);
assertNotNull(bean2);
}
}
{code}
In both cases, the following exception is thrown:
{code}
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bean2] with qualifiers [@Default] at injection point [[field] @Inject private arquillian.test.OperateOnDeploymentArquilianCdiTest.bean2]
{code}
Note that test case 2 is working when only {{@Deployment(name = "beans-jar")}} is declared.
Test classes and the {{pom.xml}} are attached.
--
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
13 years, 3 months