In your create_elements_for_attributes method create_elements_for_attributes you expect one argument of type WebElement , but your regular expression does not accept any arguments. Instead, it should look something like this:
@When("^create elements \"([^\"]*)\"$")
And then in your properties file:
When create elements "element"
But this will not work, because you cannot pass the WebeElement object from your Cucumber function file. You should only work with primitive values ββand DataTables. Other types (e.g. WebeElement) must be created inside the glue code itself.
source share