[arquillian-issues] [JBoss JIRA] (ARQGRA-256) Graphene RemoteWebDriver doesn't support augmentation properly
Ron Šmeral (JIRA)
jira-events at lists.jboss.org
Tue Jan 15 14:07:21 EST 2013
Ron Šmeral created ARQGRA-256:
---------------------------------
Summary: Graphene RemoteWebDriver doesn't support augmentation properly
Key: ARQGRA-256
URL: https://issues.jboss.org/browse/ARQGRA-256
Project: Arquillian Graphene
Issue Type: Bug
Environment: Graphene 2.0.0.Alpha3-SNAPSHOT
Reporter: Ron Šmeral
When using a remote WebDriver, trying to take a screenshot as described in [WebDriver documentation|http://seleniumhq.org/docs/04_webdriver_advanced.jsp#taking-a-screenshot]:
{code:java}
@Drone
WebDriver driver;
...
WebDriver augmentedDriver = new Augmenter().augment(driver);
byte[] screenshot = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.BYTES);
{code}
results in the following exeception:
{noformat}
Caused by: java.lang.ClassFormatError: Duplicate method name&signature in class file org/openqa/selenium/remote/RemoteWebDriver$$EnhancerCGLIB$$58fd8af5$$EnhancerByCGLIB$$558c2b50
{noformat}
If the augmentation is omitted, the {{TakesScreenshot}} interface can't be found:
{noformat}
java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebDriver$$EnhancerCGLIB$$eda133bb cannot be cast to org.openqa.selenium.TakesScreenshot
{noformat}
It seems that the CGLib-enhanced {{RemoteWebDriver}} instance contains the methods of capability providers ({{AddTakesScreenshot}}) but doesn't declare that it implements their corresponding interfaces ({{TakesScreenshot}}).
Note that taking screenshots works without the augmentation when using a non-remote WebDriver. (When using augmentation it throws the _Duplicate method name&signature_ exception).
--
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 arquillian-issues
mailing list