[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 resolved ARQGRA-512.
-----------------------------------
Fix Version/s: 2.3.2
Resolution: Done
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, 1 month
[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 reassigned ARQGRA-511:
-------------------------------------
Assignee: Matous Jobanek
> 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
>
> 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, 1 month
[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 reassigned ARQGRA-512:
-------------------------------------
Assignee: Matous Jobanek
> 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
>
> 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, 1 month
[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 commented on ARQGRA-511:
---------------------------------------
Hi, thank you for reporting and sorry for the delay.
Good catch with it - this should fix this issue: 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
>
> 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, 1 month
[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 commented on ARQGRA-512:
---------------------------------------
Hi,
thx for reporting this issue. And sorry for a long inactivity.
We weren't able to properly update to the Selenium 3.6.0 because of this issue: https://github.com/SeleniumHQ/selenium/issues/4781
This should fix it: 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
>
> 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, 1 month
[JBoss JIRA] (ARQGRA-513) Calling isPresent on root of fragment throws NoSuchElementException
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-513?page=com.atlassian.jira.plugin... ]
Matous Jobanek commented on ARQGRA-513:
---------------------------------------
Hi, thank you for reporting this issue.
I've been trying to reproduce this issue, but without any success.
This exception is checked in the method `isPresent` so it shouldn't be thrown.
Is your project/test somewhere available (github)
> Calling isPresent on root of fragment throws NoSuchElementException
> -------------------------------------------------------------------
>
> Key: ARQGRA-513
> URL: https://issues.jboss.org/browse/ARQGRA-513
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.3.1
> Reporter: S Haster
>
> We have a page object that includes a fragment. The fragment injects its root as a GrapheneElement so we could call isPresent() on it. However, if we do actually call isPresent() it throws a NoSuchElementException for the fragment.
> The page is as follows:
> {code:java}
> public abstract class AbstractGKeyHubPage
> {
> @FindBy(css = "ul.feedbackPanel")
> private GFeedbackPanel feedbackPanel;
> }
> {code}
> The GFeedbackPanel fragment is set up like:
> {code:java}
> public class GFeedbackPanel
> {
> @Root
> private GrapheneElement panel;
>
> public void assertNotInfo(String key)
> {
> boolean present = panel.isPresent();
> //... more tests
> }
> }
> {code}
> When we call
> {code:java}
> page.feedbackPanel.assertNotInfo(key);
> {code}
> we get a NoSuchElementException on the feedbackpanel, on the panel.isPresent();-line:
> {noformat}
> Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"ul.feedbackPanel"}
> (Session info: headless chrome=61.0.3163.100)
> (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.0-16-lowlatency x86_64) (WARNING: The server did not provide any stacktrace information)
> Command duration or timeout: 0 milliseconds
> For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
> Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
> System info: host: 'schootbak3', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.13.0-16-lowlatency', java.version: '1.8.0_144'
> Driver info: org.openqa.selenium.remote.RemoteWebDriver
> Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=LINUX, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=LINUX, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4), userDataDir=/tmp/.org.chromium.Chromium.uoWwlR}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=61.0.3163.100, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
> Session ID: 7f36f43306ea95223042b19584846cfe
> *** Element info: {Using=css selector, value=ul.feedbackPanel}
> at org.jboss.arquillian.graphene.enricher.WebElementUtils$5.getTarget(WebElementUtils.java:135)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:149)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.getTarget(GrapheneContextualHandler.java:218)
> 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:209)
> 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 nl.topicus.keyhub.arquillian.selenium.fragment.panel.GFeedbackPanel.assertNotInfo(GFeedbackPanel.java:78)
> 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.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.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:263)
> ... 1 more
> Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"ul.feedbackPanel"}
> (Session info: headless chrome=61.0.3163.100)
> (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.0-16-lowlatency x86_64) (WARNING: The server did not provide any stacktrace information)
> Command duration or timeout: 0 milliseconds
> For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
> Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
> System info: host: 'schootbak3', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.13.0-16-lowlatency', java.version: '1.8.0_144'
> Driver info: org.openqa.selenium.remote.RemoteWebDriver
> Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=LINUX, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=LINUX, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4), userDataDir=/tmp/.org.chromium.Chromium.uoWwlR}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=61.0.3163.100, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
> Session ID: 7f36f43306ea95223042b19584846cfe
> *** Element info: {Using=css selector, value=ul.feedbackPanel}
> at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
> at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
> at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
> at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
> at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
> at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
> at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
> at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:416)
> at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:510)
> at org.openqa.selenium.By$ByCssSelector.findElement(By.java:430)
> at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:408)
> at org.openqa.selenium.remote.Augmenter$CompoundHandler.intercept(Augmenter.java:189)
> at org.jboss.arquillian.graphene.enricher.WebElementUtils.dropProxyAndFindElement(WebElementUtils.java:168)
> at org.jboss.arquillian.graphene.enricher.WebElementUtils$5.getTarget(WebElementUtils.java:133)
> ... 24 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (ARQ-2147) Upgrade to Selenium 3.7.0
by Matous Jobanek (JIRA)
Matous Jobanek created ARQ-2147:
-----------------------------------
Summary: Upgrade to Selenium 3.7.0
Key: ARQ-2147
URL: https://issues.jboss.org/browse/ARQ-2147
Project: Arquillian
Issue Type: Component Upgrade
Components: Extension - Drone
Affects Versions: drone_2.4.2
Reporter: Matous Jobanek
Assignee: Matous Jobanek
Fix For: drone_2.4.3
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month