-
|
I am trying to use Data table with regex and it is not recognising the datatable? Extract from my Feature File:- When A user provides correct email address and password, and clicks on the login button Good case with step definition using "alternate ( / ) matching" my data table works:- Bad case with step definition using regex and datatable, I get error "TypeError: Cannot read properties of null (reading 'hashes')" When( (table) => { How can I use DataTable with a regex expression. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
sorted, for the regex case I needed to add an extra arg to the arrow function:- (extraArg, table) => { |
Beta Was this translation helpful? Give feedback.
sorted, for the regex case I needed to add an extra arg to the arrow function:-
When(
/A user provides (in)?correct email address and password, and clicks on the login button/,
(extraArg, table) => {
table.hashes().forEach((row) => { ...... });
}
);