what is the error of cucumber.runtime.CucumberException: Arity mismatch: Step Definition in selenium with Java
<p>I have wrritten a feature file to test the create elements button. But it generates an error message of  </p>

<pre><code>cucumber.runtime.CucumberException: Arity mismatch: Step Definition. 
</code></pre>

<p>I dont know why its happening since I am new to automation testing.</p>

<p>The following is the code that I have written.</p>

<pre><code>@When("^create elements$")
public void create_elements_for_attributes(WebElement elementToClick) throws Throwable {
driver.findElement(By.id("newElement")).click();
}
</code></pre>

<p>The error that I have recieved is as follows.  </p>

<pre><code>cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'mCollector.features.StepDefinitions_mCollector.create_elements_for_attributes(WebElement) in file:/C:/Users/Admin/workspace/MStudio%20-%20eBilling/bin/' with pattern [^create elements$] is declared with 1 parameters. However, the gherkin step has 0 arguments [].
</code></pre>