org.codehaus.groovy.runtime.typehandling.GroovyCastException

Cannot cast object 'org.openqa.selenium.htmlunit.HtmlUnitDriver@7c8c70d6' with class 'org.openqa.selenium.htmlunit.HtmlUnitDriver' to class 'io.appium.java_client.android.AndroidDriver' at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:392)

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web7

  • via Stack Overflow by Vijay Lonare
    ,
  • via Unknown by Unknown author,
  • Stack trace

    • org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.openqa.selenium.htmlunit.HtmlUnitDriver@7c8c70d6' with class 'org.openqa.selenium.htmlunit.HtmlUnitDriver' to class 'io.appium.java_client.android.AndroidDriver' at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:392) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:306) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:227) at org.codehaus.groovy.runtime.DefaultGroovyMethods.asType(DefaultGroovyMethods.java:12580) at org.codehaus.groovy.runtime.dgm$48.doMethodInvoke(Unknown Source) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1206) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015) at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:889) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:880) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:166) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:589) at com.medtronic.neuro.intellis.pageobjects.IntellisApplication.startTestModeApp(IntellisApplication.groovy:152) at com.medtronic.neuro.intellis.pageobjects.IntellisApplication$startTestModeApp$0.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137) at com.medtronic.neuro.intellis.pageobjects.IntellisApplication.startCommManagerInTestMode(IntellisApplication.groovy:177) at com.medtronic.neuro.intellis.at.steps.setup.Setup.configureApplication(Setup.java:152) at com.medtronic.neuro.intellis.at.steps.setup.Setup.beforeScenario(Setup.java:79) 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 cucumber.runtime.Utils$1.call(Utils.java:37) at cucumber.runtime.Timeout.timeout(Timeout.java:13) at cucumber.runtime.Utils.invoke(Utils.java:31) at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:59) at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222) at cucumber.runtime.Runtime.runHooks(Runtime.java:210) at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:200) at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44) at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:91) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:93) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at cucumber.api.junit.Cucumber.run(Cucumber.java:98) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    johnxflyjohnxfly
    2 times, last one
    LukaLuka
    2 times, last one
    rlovtangenrlovtangen
    2 times, last one