I expect that element does appear exactly * times - doesn't work
Issue description
Please provide a brief description of the problem you are experiencing
Steps to reproduce
Run a step "I expect that element "([^"])?" does( not) appear exactly "([^"]*)?" times"
Expected behavior
Should count the number of times an element is present on a page This step is also missing in snippets https://github.com/webdriverio/cucumber-boilerplate/blob/main/src/features/sampleSnippets.feature
Actual behavior
'Value must be a non-negative integer' error is thrown (prob some parsing\casting issue)
Issue occurred on browser/platform
Windows \ Chrome 100
Great idea of this step, would love to see it working. The framework is fantastic as well. I love it a lot!
@denis-platonov thanks for filing the issue.
This seems like a bug indeed. Would you like to help us providing a fix?
I would love to but I'm not JavaScript\TypeScript developer
https://github.com/webdriverio/cucumber-boilerplate/blob/002e934c24e502da4e348cb32eed9c9f2e7cf773/src/support/lib/checkIfElementExists.ts#L28-L29
The issue lies here, the code checks for strict equality.
Whereas the exactly is being received as string (number "4"), so the type checking fails as the exactly should be a number and not a string.
Converting the exactly to a number will fix the issue.
