[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Jan Papousek updated ARQGRA-264:
--------------------------------
Affects Version/s: 2.0.0.Alpha3
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 11 months
[JBoss JIRA] (ARQGRA-258) Provide injecting classes requiring WebElement in their constructors via @FindBy annotation
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-258?page=com.atlassian.jira.plugin... ]
Jan Papousek resolved ARQGRA-258.
---------------------------------
Resolution: Done
Unfortunately the new enrichment can't be used for injecting fields with type org.openqa.selenium.support.ui.Select, because the Select class accesses to the web element in its constructor and the web element isn't available yet (page is not loaded for example).
This can be solved by introducing own implementation of Select which doesn't access to the web element in its constructor.
> Provide injecting classes requiring WebElement in their constructors via @FindBy annotation
> -------------------------------------------------------------------------------------------
>
> Key: ARQGRA-258
> URL: https://issues.jboss.org/browse/ARQGRA-258
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Jan Papousek
> Assignee: Jan Papousek
> Priority: Minor
> Fix For: 2.0.0.Beta1
>
>
> Consider the following class:
> {code}
> public class WebElementWrapper {
> private final WebElement element;
> public WebElementWrapper(WebElement element) {
> this.element = element;
> }
> ...
> }
> {code}
> It would be nice to allow injecting this type into a test class:
> {code}
> @FindBy(...)
> private WebElementWrapper wrapper;
> {code}
> -----
> -There is a [Select|http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/...] class for a better manipulation with selects. It would be nice to allow injecting instances of this class via @FindBy mechanism.-
--
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
11 years, 11 months
[JBoss JIRA] (ARQGRA-257) Guards are not working with AndroidDriver
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-257?page=com.atlassian.jira.plugin... ]
Jan Papousek updated ARQGRA-257:
--------------------------------
Fix Version/s: 2.0.0.Beta1
> Guards are not working with AndroidDriver
> ------------------------------------------
>
> Key: ARQGRA-257
> URL: https://issues.jboss.org/browse/ARQGRA-257
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Environment: Selenium 2.28.0, Android 4.1.0
> Reporter: Jan Papousek
> Assignee: Jan Papousek
> Fix For: 2.0.0.Beta1
>
>
> When I try to use request guards:
> {code}
> Graphene.guardXhr(page.input).sendKeys("something");
> {code}
> the following exception is thrown:
> {code}
> java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Error: {"message":"Unexpected token var"}
> Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
> System info: os.name: 'Linux', os.arch: 'i686', os.version: '2.6.29', java.version: '0'
> Driver info: driver.version: EventFiringWebDriver
> Command duration or timeout: 364 milliseconds
> Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 15:53:30'
> System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-32-generic', java.version: '1.7.0_11'
> Session ID: 1355499270694
> Driver info: org.openqa.selenium.android.AndroidDriver
> Capabilities [{platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, handlesAlerts=true, browserName=android, browserConnectionEnabled=true, webStorageEnabled=true, rotatable=true, locationContextEnabled=true, applicationCacheEnabled=true, webdriver.remote.sessionid=1355499270694, takesScreenshot=true, version=16}]
> at org.jboss.arquillian.graphene.javascript.JavaScriptUtils.execute(JavaScriptUtils.java:48)
> at org.jboss.arquillian.graphene.javascript.JavaScriptUtils.execute(JavaScriptUtils.java:37)
> at org.jboss.arquillian.graphene.page.extension.RemotePageExtensionInstallatorProvider$1.installWithoutRequirements(RemotePageExtensionInstallatorProvider.java:54)
> at org.jboss.arquillian.graphene.page.extension.AbstractPageExtensionInstallator.install(AbstractPageExtensionInstallator.java:53)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:209)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:140)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:170)
> at $Proxy35.install(Unknown Source)
> at org.jboss.arquillian.graphene.javascript.DefaultExecutionResolver.execute(DefaultExecutionResolver.java:80)
> at org.jboss.arquillian.graphene.javascript.JSInterfaceHandler.intercept(JSInterfaceHandler.java:33)
> at org.jboss.arquillian.graphene.cglib.ClassImposterizer$ClassWithSuperclassToWorkAroundCglibBug$$EnhancerCGLIB$$b19e9bf1.clearRequestDone(<generated>)
> at org.jboss.arquillian.graphene.guard.RequestGuardFactory$1.intercept(RequestGuardFactory.java:76)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:25)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:21)
> at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:177)
> at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:175)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:204)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:175)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:21)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
> at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:107)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:170)
> at $Proxy32.sendKeys(Unknown Source)
> at org.richfaces.tests.showcase.ajax.TestAjax.testEraseStringFromInputAndCheckTheOutput(TestAjax.java:59)
> at org.jboss.arquillian.testng.Arquillian$2.invoke(Arquillian.java:167)
> at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
> at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:158)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: org.openqa.selenium.WebDriverException: Error: {"message":"Unexpected token var"}
> Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
> System info: os.name: 'Linux', os.arch: 'i686', os.version: '2.6.29', java.version: '0'
> Driver info: driver.version: EventFiringWebDriver
> Command duration or timeout: 364 milliseconds
> Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 15:53:30'
> System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-32-generic', java.version: '1.7.0_11'
> Session ID: 1355499270694
> Driver info: org.openqa.selenium.android.AndroidDriver
> Capabilities [{platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, handlesAlerts=true, browserName=android, browserConnectionEnabled=true, webStorageEnabled=true, rotatable=true, locationContextEnabled=true, applicationCacheEnabled=true, webdriver.remote.sessionid=1355499270694, takesScreenshot=true, version=16}]
> at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
> at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
> at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:533)
> at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:441)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:209)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:140)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:170)
> at $Proxy22.executeScript(Unknown Source)
> at org.jboss.arquillian.graphene.javascript.JavaScriptUtils.execute(JavaScriptUtils.java:43)
> ... 121 more
> Caused by: org.openqa.selenium.WebDriverException: Error: {"message":"Unexpected token var"}
> Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
> System info: os.name: 'Linux', os.arch: 'i686', os.version: '2.6.29', java.version: '0'
> Driver info: driver.version: EventFiringWebDriver
> Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 15:53:30'
> System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-32-generic', java.version: '1.7.0_11'
> Driver info: driver.version: EventFiringWebDriver
> at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:997)
> at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:868)
> at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:903)
> at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:757)
> at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
> at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:102)
> at $Proxy1.executeScript(Native Method)
> at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:210)
> at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:56)
> at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
> at java.util.concurrent.FutureTask.run(FutureTask.java:137)
> at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:151)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
> at java.lang.Thread.run(Thread.java:856)
> ... Removed 70 stack frames
> {code}
> The problem is caused by line breaks elimination and this commit: https://github.com/arquillian/arquillian-graphene/commit/11be83cae60f3b76....
--
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
11 years, 11 months
[JBoss JIRA] (ARQ-1027) Support CommandService Protocol SPI via Warp Protocol
by Aris Tzoumas (JIRA)
[ https://issues.jboss.org/browse/ARQ-1027?page=com.atlassian.jira.plugin.s... ]
Aris Tzoumas commented on ARQ-1027:
-----------------------------------
Done.
> Support CommandService Protocol SPI via Warp Protocol
> -----------------------------------------------------
>
> Key: ARQ-1027
> URL: https://issues.jboss.org/browse/ARQ-1027
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Warp
> Affects Versions: warp_1.0.0.Alpha1
> Reporter: Curtis McMillen
> Priority: Critical
> Fix For: warp_1.0.0.Beta1
>
> Attachments: stacktrace.txt
>
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> It seems there is a problem with running Warp tests if arquillian-jacoco is on the classpath.
> When WarpFilter fires the AfterSuite event, the writeCoverageData observer in arquillian-jacoco is executing which ultimately leads to a NPE coming from servlet protocol. The full stacktrace is attached.
> You can reproduce by simply adding the following dependencies to the pom for warp in arquillian-showcase and then running the BasicJSFUnitTestCase.
> {code:xml}
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-jacoco</artifactId>
> <version>1.0.0.Alpha3</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jacoco</groupId>
> <artifactId>org.jacoco.core</artifactId>
> <version>0.5.7.201204190339</version>
> <scope>test</scope>
> </dependency>
> {code}
> Removing these dependencies isn't really an option because I have other arquillian tests not using Warp that I want code coverage on. I tried using alternative annotated with @Specializes thinking I could basically disable the observer in arquillian-jacoco simply by including a different beans.xml in the deployment of my Warp tests. This however fails with "WELD-000047 Specializing bean must extend another bean" which I'm thinking is due to https://issues.jboss.org/browse/WELD-1113.
> Any ideas for getting this to work?
--
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
11 years, 11 months
[JBoss JIRA] (ARQ-1027) Support CommandService Protocol SPI via Warp Protocol
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQ-1027?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on ARQ-1027:
---------------------------------
Hey Aris, could you please sign a CLA for Arquillian project?
https://cla.jboss.org/index.seam
> Support CommandService Protocol SPI via Warp Protocol
> -----------------------------------------------------
>
> Key: ARQ-1027
> URL: https://issues.jboss.org/browse/ARQ-1027
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Warp
> Affects Versions: warp_1.0.0.Alpha1
> Reporter: Curtis McMillen
> Priority: Critical
> Fix For: warp_1.0.0.Beta1
>
> Attachments: stacktrace.txt
>
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> It seems there is a problem with running Warp tests if arquillian-jacoco is on the classpath.
> When WarpFilter fires the AfterSuite event, the writeCoverageData observer in arquillian-jacoco is executing which ultimately leads to a NPE coming from servlet protocol. The full stacktrace is attached.
> You can reproduce by simply adding the following dependencies to the pom for warp in arquillian-showcase and then running the BasicJSFUnitTestCase.
> {code:xml}
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-jacoco</artifactId>
> <version>1.0.0.Alpha3</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jacoco</groupId>
> <artifactId>org.jacoco.core</artifactId>
> <version>0.5.7.201204190339</version>
> <scope>test</scope>
> </dependency>
> {code}
> Removing these dependencies isn't really an option because I have other arquillian tests not using Warp that I want code coverage on. I tried using alternative annotated with @Specializes thinking I could basically disable the observer in arquillian-jacoco simply by including a different beans.xml in the deployment of my Warp tests. This however fails with "WELD-000047 Specializing bean must extend another bean" which I'm thinking is due to https://issues.jboss.org/browse/WELD-1113.
> Any ideas for getting this to work?
--
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
11 years, 11 months