So I’m using with cucumber framework but I have encountered myself with the following situation:
The feature file comes like this:

Scenario Outline: Scenario

Given situation A
When I enter a valid "<Brand>" credit card number: "<Number>" 
And the credit card CVC is "<CVC>"
And the credit card expiration date is "<ExpirationDate>"
Then Output here

Examples:
  | Number|Brand| CVC | ExpirationDate | 
  | 4242424242422121 | Visa | 123 | 11/2020 |  

On the test script I got something like:
const { Given, When, Then, And } = require(‘cucumber’)

And when I try to call the “And” method like this:

and(‘the credit card CVC is “([^”]*)”‘, (CVC)
{
//code here
})

I receive an error that says: “And” is not a function.
We cannot include the “And” “But” keywords on Webdriverio?

If so, what would be an alternative to make this type of scenarios going?

Thanks in advance for the help!



Source link https://sqa.stackexchange.com/questions/34677/webdriverio-and--is-not-a-function

LEAVE A REPLY

Please enter your comment!
Please enter your name here