cucumber.runtime.CucumberException: Don't know how to convert ""myWebElement"" into org.openqa.selenium.WebElement. Try writing your own converter: @cucumber.deps.com.thoughtworks.xstream.annotations.XStreamConverter(WebElementConverter.class) public class WebElement {}

Stack Overflow | rs79 | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Passing a WebElement parameter from a Cucumber feature into the Step Definition

    Stack Overflow | 9 months ago | rs79
    cucumber.runtime.CucumberException: Don't know how to convert ""myWebElement"" into org.openqa.selenium.WebElement. Try writing your own converter: @cucumber.deps.com.thoughtworks.xstream.annotations.XStreamConverter(WebElementConverter.class) public class WebElement {}

    Root Cause Analysis

    1. cucumber.runtime.CucumberException

      Don't know how to convert ""myWebElement"" into org.openqa.selenium.WebElement. Try writing your own converter: @cucumber.deps.com.thoughtworks.xstream.annotations.XStreamConverter(WebElementConverter.class) public class WebElement {}

      at cucumber.runtime.ParameterInfo.convert()
    2. Cucumber-JVM: Core
      CucumberFeature.run
      1. cucumber.runtime.ParameterInfo.convert(ParameterInfo.java:150)
      2. cucumber.runtime.StepDefinitionMatch.transformedArgs(StepDefinitionMatch.java:68)
      3. cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
      4. cucumber.runtime.Runtime.runStep(Runtime.java:299)
      5. cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
      6. cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
      7. cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
      8. cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
      8 frames
    3. cucumber.api.testng
      AbstractTestNGCucumberTests.feature
      1. cucumber.api.testng.TestNGCucumberRunner.runCucumber(TestNGCucumberRunner.java:63)
      2. cucumber.api.testng.AbstractTestNGCucumberTests.feature(AbstractTestNGCucumberTests.java:21)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    5. TestNG
      TestMethodWorker.run
      1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
      2. org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
      3. org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
      4. org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
      5. org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
      6. org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
      6 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:744)
      3 frames