You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using serenity-cucumber5 with Scala.
My step definition is: import io.cucumber.scala.{EN, ScalaDsl} class ScalaSteps extends EN with ScalaDsl { Given("test scala print something") { () => print(s"In Scala printing") } }
When I run my test I am getting java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) at net.serenitybdd.cucumber.util.StepDefinitionAnnotationReader.className(StepDefinitionAnnotationReader.java:76)
Caused by StepDefinitionAnnotationReader class (line 75) stepDefinitionPath value is 'ScalaSteps.scala:6' and there is no '(' so it is throwing exception.
Is there a way to skip/override the getScreenshotPreferences method
or do we have any other workaround so that I can use serenity-cucumber5 with Scala.
Note - the same scenario is working with serenity-cucumber4
The text was updated successfully, but these errors were encountered:
Hi,
I am using serenity-cucumber5 with Scala.
My step definition is:
import io.cucumber.scala.{EN, ScalaDsl} class ScalaSteps extends EN with ScalaDsl { Given("test scala print something") { () => print(s"In Scala printing") } }
When I run my test I am getting
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) at net.serenitybdd.cucumber.util.StepDefinitionAnnotationReader.className(StepDefinitionAnnotationReader.java:76)
Caused by
StepDefinitionAnnotationReader
class (line 75)stepDefinitionPath
value is 'ScalaSteps.scala:6' and there is no '(' so it is throwing exception.Is there a way to skip/override the
getScreenshotPreferences
methodor do we have any other workaround so that I can use serenity-cucumber5 with Scala.
Note - the same scenario is working with serenity-cucumber4
The text was updated successfully, but these errors were encountered: