[arquillian-issues] [JBoss JIRA] (ARQGRA-512) ClassCastException while performing MouseActions against selenium 3.6.0

S Haster (JIRA) issues at jboss.org
Thu Sep 28 09:33:02 EDT 2017


S Haster created ARQGRA-512:
-------------------------------

             Summary: 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.2.3#72005)


More information about the arquillian-issues mailing list