Uploaded image for project: 'Arquillian Graphene'
  1. Arquillian Graphene
  2. ARQGRA-512

ClassCastException while performing MouseActions against selenium 3.6.0

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.3.2
    • Component/s: None
    • Labels:
      None

      Description

      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:

      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>
      

      The 'dragOnto'method does:

      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();
      	}
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mjobanek Matous Jobanek
                Reporter:
                buurmansven S Haster
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: