[JBoss JIRA] (ARQGRA-511) Graphene proxies don't support calling protected/package-protected methods in a valid context
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-511?page=com.atlassian.jira.plugin... ]
Matous Jobanek reopened ARQGRA-511:
-----------------------------------
> Graphene proxies don't support calling protected/package-protected methods in a valid context
> ---------------------------------------------------------------------------------------------
>
> Key: ARQGRA-511
> URL: https://issues.jboss.org/browse/ARQGRA-511
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.1.0.Final
> Reporter: Vsevolod Golovanov
> Assignee: Matous Jobanek
> Fix For: 2.3.2
>
>
> I have this base Component (Page Fragment) Class:
> {code}
> public abstract class Component {
> protected WebElement getRoot() {
> // ...
> }
> @Override
> public boolean equals(Object obj) {
> if (!(obj instanceof Component))
> return false;
> // WebElementUtils.equal is a ARQGRA-484 workaround, irrelevant here
> return WebElementUtils.equal(getRoot(), ((Component) obj).getRoot());
> }
> }
> {code}
> The equals call results in an exception
> {code}java.lang.RuntimeException: unexpected invocation exception during invocation of ru.argustelecom.system.inf.testframework.it.ui.comp.Component#getRoot(), on target 'ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete@83ddf46d': Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:137)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.getRoot(<generated>)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.Component.equals(Component.java:283)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.equals(<generated>)
> at org.junit.Assert.isEquals(Assert.java:131)
> at org.junit.Assert.equalsRegardingNull(Assert.java:127)
> at org.junit.Assert.assertEquals(Assert.java:111)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.test.AutoCompleteIT.autoComplete(AutoCompleteIT.java:42)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:370)
> at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:130)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:73)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:145)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
> at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:363)
> at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:245)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:259)
> at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:315)
> at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
> at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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.createBeforeContext(ContainerEventController.java:124)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:130)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:73)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
> at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:311)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:204)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.IllegalAccessException: Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
> at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
> at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
> at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
> at java.lang.reflect.Method.invoke(Method.java:491)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> ... 151 more
> {code}
> Looking at the GrapheneProxyHandler code:
> {code}
> protected Object invokeReal(Object target, Method method, Object[] args) throws Throwable {
> Object result;
> try {
> if (target instanceof GrapheneProxyInstance) {
> target = ((GrapheneProxyInstance) target).unwrap();
> }
> if (!method.getDeclaringClass().isInstance(target)) {
> Method realMethod = target.getClass().getDeclaredMethod(method.getName(), method.getParameterTypes());
> if (!realMethod.isAccessible()) {
> realMethod.setAccessible(true);
> }
> result = realMethod.invoke(target, args);
> } else {
> result = method.invoke(target, args);
> }
> // ...
> {code}
> This {{!method.getDeclaringClass().isInstance(target)}} check doesn't pass, so the accessibility modification is skipped. And naturally GrapheneProxyHandler doesn't have an access to Component#getRoot since it's in a different package and not a subclass.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ARQGRA-512) ClassCastException while performing MouseActions against selenium 3.6.0
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-512?page=com.atlassian.jira.plugin... ]
Matous Jobanek closed ARQGRA-512.
---------------------------------
Resolution: Done
> ClassCastException while performing MouseActions against selenium 3.6.0
> -----------------------------------------------------------------------
>
> Key: ARQGRA-512
> URL: https://issues.jboss.org/browse/ARQGRA-512
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.3.1
> Reporter: S Haster
> Assignee: Matous Jobanek
> Fix For: 2.3.2
>
>
> Selenium 3.6.0 is api breaking (w/ regards to 3.5.3) and graphene is not yet updated.
> We recently upgraded to selenium 3.6.0 and are running graphene 2.3.1
> While performing a ClickAndHoldAction we get a ClassCastException. The reason is because selenium-api created a second Locatable as a super-interface of the old one and GrapheneElementImpl uses the 'old' one but RemoteWebElement only implements the 'new' one.
> Stacktrace:
> {noformat}
> java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to org.openqa.selenium.internal.Locatable
> at org.jboss.arquillian.graphene.GrapheneElementImpl.getCoordinates(GrapheneElementImpl.java:259)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:169)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:47)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:43)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
> at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.until(WebDriverWaitImpl.java:96)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:43)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:139)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> 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.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:241)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:237)
> at org.openqa.selenium.interactions.internal.MouseAction.getActionLocation(MouseAction.java:65)
> at org.openqa.selenium.interactions.internal.MouseAction.moveToLocation(MouseAction.java:72)
> at org.openqa.selenium.interactions.ClickAndHoldAction.perform(ClickAndHoldAction.java:45)
> at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
> at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:641)
> at nl.topicus.keyhub.arquillian.selenium.page.console.GMyGroupFoldersPage.dragOnto(GMyGroupFoldersPage.java:56)
> at <our testclass>
> {noformat}
> The 'dragOnto'method does:
> {code:java}
> public void dragOnto(String groupName, String folderName)
> {
> WebDriver driver = GrapheneHelper.getDriver(add);
> WebElement group = driver.findElement(
> By.cssSelector("div.content--part div.tasks .task[data-value='" + groupName + "']"));
> WebElement targetFolder = driver
> .findElement(By.cssSelector("div.content--part[data-value='" + folderName + "']"));
> Action dragAndDrop = new Actions(driver).dragAndDrop(group, targetFolder).build();
> dragAndDrop.perform();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ARQGRA-512) ClassCastException while performing MouseActions against selenium 3.6.0
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-512?page=com.atlassian.jira.plugin... ]
Matous Jobanek edited comment on ARQGRA-512 at 11/3/17 11:00 AM:
-----------------------------------------------------------------
Pushed upstream in: https://github.com/arquillian/arquillian-graphene/commit/e5e25489d7b68935...
was (Author: mjobanek):
Pushed upstream in: https://github.com/arquillian/arquillian-graphene/pull/174
> ClassCastException while performing MouseActions against selenium 3.6.0
> -----------------------------------------------------------------------
>
> Key: ARQGRA-512
> URL: https://issues.jboss.org/browse/ARQGRA-512
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.3.1
> Reporter: S Haster
> Assignee: Matous Jobanek
> Fix For: 2.3.2
>
>
> Selenium 3.6.0 is api breaking (w/ regards to 3.5.3) and graphene is not yet updated.
> We recently upgraded to selenium 3.6.0 and are running graphene 2.3.1
> While performing a ClickAndHoldAction we get a ClassCastException. The reason is because selenium-api created a second Locatable as a super-interface of the old one and GrapheneElementImpl uses the 'old' one but RemoteWebElement only implements the 'new' one.
> Stacktrace:
> {noformat}
> java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to org.openqa.selenium.internal.Locatable
> at org.jboss.arquillian.graphene.GrapheneElementImpl.getCoordinates(GrapheneElementImpl.java:259)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:169)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:47)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:43)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
> at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.until(WebDriverWaitImpl.java:96)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:43)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:139)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> 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.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:241)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:237)
> at org.openqa.selenium.interactions.internal.MouseAction.getActionLocation(MouseAction.java:65)
> at org.openqa.selenium.interactions.internal.MouseAction.moveToLocation(MouseAction.java:72)
> at org.openqa.selenium.interactions.ClickAndHoldAction.perform(ClickAndHoldAction.java:45)
> at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
> at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:641)
> at nl.topicus.keyhub.arquillian.selenium.page.console.GMyGroupFoldersPage.dragOnto(GMyGroupFoldersPage.java:56)
> at <our testclass>
> {noformat}
> The 'dragOnto'method does:
> {code:java}
> public void dragOnto(String groupName, String folderName)
> {
> WebDriver driver = GrapheneHelper.getDriver(add);
> WebElement group = driver.findElement(
> By.cssSelector("div.content--part div.tasks .task[data-value='" + groupName + "']"));
> WebElement targetFolder = driver
> .findElement(By.cssSelector("div.content--part[data-value='" + folderName + "']"));
> Action dragAndDrop = new Actions(driver).dragAndDrop(group, targetFolder).build();
> dragAndDrop.perform();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ARQGRA-512) ClassCastException while performing MouseActions against selenium 3.6.0
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-512?page=com.atlassian.jira.plugin... ]
Matous Jobanek reopened ARQGRA-512:
-----------------------------------
> ClassCastException while performing MouseActions against selenium 3.6.0
> -----------------------------------------------------------------------
>
> Key: ARQGRA-512
> URL: https://issues.jboss.org/browse/ARQGRA-512
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.3.1
> Reporter: S Haster
> Assignee: Matous Jobanek
> Fix For: 2.3.2
>
>
> Selenium 3.6.0 is api breaking (w/ regards to 3.5.3) and graphene is not yet updated.
> We recently upgraded to selenium 3.6.0 and are running graphene 2.3.1
> While performing a ClickAndHoldAction we get a ClassCastException. The reason is because selenium-api created a second Locatable as a super-interface of the old one and GrapheneElementImpl uses the 'old' one but RemoteWebElement only implements the 'new' one.
> Stacktrace:
> {noformat}
> java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to org.openqa.selenium.internal.Locatable
> at org.jboss.arquillian.graphene.GrapheneElementImpl.getCoordinates(GrapheneElementImpl.java:259)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:169)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:47)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:43)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
> at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.until(WebDriverWaitImpl.java:96)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:43)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:139)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> 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.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:241)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:237)
> at org.openqa.selenium.interactions.internal.MouseAction.getActionLocation(MouseAction.java:65)
> at org.openqa.selenium.interactions.internal.MouseAction.moveToLocation(MouseAction.java:72)
> at org.openqa.selenium.interactions.ClickAndHoldAction.perform(ClickAndHoldAction.java:45)
> at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
> at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:641)
> at nl.topicus.keyhub.arquillian.selenium.page.console.GMyGroupFoldersPage.dragOnto(GMyGroupFoldersPage.java:56)
> at <our testclass>
> {noformat}
> The 'dragOnto'method does:
> {code:java}
> public void dragOnto(String groupName, String folderName)
> {
> WebDriver driver = GrapheneHelper.getDriver(add);
> WebElement group = driver.findElement(
> By.cssSelector("div.content--part div.tasks .task[data-value='" + groupName + "']"));
> WebElement targetFolder = driver
> .findElement(By.cssSelector("div.content--part[data-value='" + folderName + "']"));
> Action dragAndDrop = new Actions(driver).dragAndDrop(group, targetFolder).build();
> dragAndDrop.perform();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ARQGRA-512) ClassCastException while performing MouseActions against selenium 3.6.0
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-512?page=com.atlassian.jira.plugin... ]
Matous Jobanek closed ARQGRA-512.
---------------------------------
> ClassCastException while performing MouseActions against selenium 3.6.0
> -----------------------------------------------------------------------
>
> Key: ARQGRA-512
> URL: https://issues.jboss.org/browse/ARQGRA-512
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.3.1
> Reporter: S Haster
> Assignee: Matous Jobanek
> Fix For: 2.3.2
>
>
> Selenium 3.6.0 is api breaking (w/ regards to 3.5.3) and graphene is not yet updated.
> We recently upgraded to selenium 3.6.0 and are running graphene 2.3.1
> While performing a ClickAndHoldAction we get a ClassCastException. The reason is because selenium-api created a second Locatable as a super-interface of the old one and GrapheneElementImpl uses the 'old' one but RemoteWebElement only implements the 'new' one.
> Stacktrace:
> {noformat}
> java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to org.openqa.selenium.internal.Locatable
> at org.jboss.arquillian.graphene.GrapheneElementImpl.getCoordinates(GrapheneElementImpl.java:259)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:169)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:47)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:43)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
> at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.until(WebDriverWaitImpl.java:96)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:43)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:139)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> 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.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:241)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:237)
> at org.openqa.selenium.interactions.internal.MouseAction.getActionLocation(MouseAction.java:65)
> at org.openqa.selenium.interactions.internal.MouseAction.moveToLocation(MouseAction.java:72)
> at org.openqa.selenium.interactions.ClickAndHoldAction.perform(ClickAndHoldAction.java:45)
> at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
> at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:641)
> at nl.topicus.keyhub.arquillian.selenium.page.console.GMyGroupFoldersPage.dragOnto(GMyGroupFoldersPage.java:56)
> at <our testclass>
> {noformat}
> The 'dragOnto'method does:
> {code:java}
> public void dragOnto(String groupName, String folderName)
> {
> WebDriver driver = GrapheneHelper.getDriver(add);
> WebElement group = driver.findElement(
> By.cssSelector("div.content--part div.tasks .task[data-value='" + groupName + "']"));
> WebElement targetFolder = driver
> .findElement(By.cssSelector("div.content--part[data-value='" + folderName + "']"));
> Action dragAndDrop = new Actions(driver).dragAndDrop(group, targetFolder).build();
> dragAndDrop.perform();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (ARQGRA-511) Graphene proxies don't support calling protected/package-protected methods in a valid context
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-511?page=com.atlassian.jira.plugin... ]
Matous Jobanek closed ARQGRA-511.
---------------------------------
Fix Version/s: 2.3.2
Resolution: Done
Pushed upstream in: https://github.com/arquillian/arquillian-graphene/pull/175
> Graphene proxies don't support calling protected/package-protected methods in a valid context
> ---------------------------------------------------------------------------------------------
>
> Key: ARQGRA-511
> URL: https://issues.jboss.org/browse/ARQGRA-511
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.1.0.Final
> Reporter: Vsevolod Golovanov
> Assignee: Matous Jobanek
> Fix For: 2.3.2
>
>
> I have this base Component (Page Fragment) Class:
> {code}
> public abstract class Component {
> protected WebElement getRoot() {
> // ...
> }
> @Override
> public boolean equals(Object obj) {
> if (!(obj instanceof Component))
> return false;
> // WebElementUtils.equal is a ARQGRA-484 workaround, irrelevant here
> return WebElementUtils.equal(getRoot(), ((Component) obj).getRoot());
> }
> }
> {code}
> The equals call results in an exception
> {code}java.lang.RuntimeException: unexpected invocation exception during invocation of ru.argustelecom.system.inf.testframework.it.ui.comp.Component#getRoot(), on target 'ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete@83ddf46d': Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:137)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.getRoot(<generated>)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.Component.equals(Component.java:283)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.equals(<generated>)
> at org.junit.Assert.isEquals(Assert.java:131)
> at org.junit.Assert.equalsRegardingNull(Assert.java:127)
> at org.junit.Assert.assertEquals(Assert.java:111)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.test.AutoCompleteIT.autoComplete(AutoCompleteIT.java:42)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:370)
> at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:130)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:73)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:145)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
> at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:363)
> at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:245)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:259)
> at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:315)
> at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
> at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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.createBeforeContext(ContainerEventController.java:124)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:130)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:73)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
> at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:311)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:204)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.IllegalAccessException: Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
> at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
> at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
> at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
> at java.lang.reflect.Method.invoke(Method.java:491)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> ... 151 more
> {code}
> Looking at the GrapheneProxyHandler code:
> {code}
> protected Object invokeReal(Object target, Method method, Object[] args) throws Throwable {
> Object result;
> try {
> if (target instanceof GrapheneProxyInstance) {
> target = ((GrapheneProxyInstance) target).unwrap();
> }
> if (!method.getDeclaringClass().isInstance(target)) {
> Method realMethod = target.getClass().getDeclaredMethod(method.getName(), method.getParameterTypes());
> if (!realMethod.isAccessible()) {
> realMethod.setAccessible(true);
> }
> result = realMethod.invoke(target, args);
> } else {
> result = method.invoke(target, args);
> }
> // ...
> {code}
> This {{!method.getDeclaringClass().isInstance(target)}} check doesn't pass, so the accessibility modification is skipped. And naturally GrapheneProxyHandler doesn't have an access to Component#getRoot since it's in a different package and not a subclass.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months