[richfaces-issues] [JBoss JIRA] (RF-13529) Taking Screenshot after failed test is broken when using remoteReusable browser session

Juraj Húska (JIRA) issues at jboss.org
Mon Feb 3 10:36:31 EST 2014


Juraj Húska created RF-13529:
--------------------------------

             Summary: Taking Screenshot after failed test is broken when using remoteReusable browser session
                 Key: RF-13529
                 URL: https://issues.jboss.org/browse/RF-13529
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: tests - functional 
    Affects Versions: 5.0.0.Alpha3
            Reporter: Juraj Húska


When running a fun test with {{-Dreusable=true}} (remoteReusable browser session), and test fails, screenshot is not taken and following exception is logged:

{code}
js_function_with_param(org.richfaces.ui.ajax.ITTestJsFunction)  Time elapsed: 11.171 sec  <<< ERROR!
java.lang.RuntimeException: unexpected invocation exception during invocation of org.openqa.selenium.TakesScreenshot#getScreenshotAs(), on target 'ReusableRemoteWebDriver: firefox on LINUX (dd4c3a27-487e-4d07-a097-dfe29c9ad83f)': org.jboss.arquillian.drone.webdriver.factory.remote.reusable.ReusableRemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType)
	at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:135)
	at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:159)
	at org.jboss.arquillian.graphene.enricher.SearchContextInterceptor.intercept(SearchContextInterceptor.java:50)
	at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
	at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:48)
	at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:44)
	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:208)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:175)
	at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.until(WebDriverWaitImpl.java:87)
	at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:44)
	at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
	at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:209)
	at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
	at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:205)
	at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:229)
	at org.jboss.arquillian.drone.webdriver.factory.remote.reusable.ReusableRemoteWebDriver$$EnhancerByGraphene$$23f31e28.getScreenshotAs(<generated>)
	at org.richfaces.arquillian.browser.FailureScreenshot.takeScreenshotOnFailure(FailureScreenshot.java:28)
	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:606)
	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.createAfterContext(ContainerEventController.java:134)
{code}

The fact that screenshot is not taken is not that serious with reusable session. More frustrating is the logged error, which pollutes the log.

The problem is that RemoteWebDriver needs to be augmented to take screenshot from it.

Note that this taking screenshot functionality can be replaced by [screenshot extension|https://github.com/smiklosovic/arquillian-unified-recorder]. (once it is released and stable).

--
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



More information about the richfaces-issues mailing list