I am trying to pass a variable value in URL path which is further stored in examples table. Unfortunately, it gives me error. Can any one please help.
Background:
* def challengeID = res.challengeID
* def version = '2'
Given url dispatch And path'/api/fire/v' + version + '/sms/otp/' + <challengeID>
And param code =<code>
And header Content-Type ='application/json'
When method GET Then status 400
Examples:
| challengeID | code |
| #(challengeID) | 2121211 |
| 3434343434343 | 111111 |
Sorry, the Examples:
table cannot be dynamic. This is standard "Cucumber" behavior. Use table
instead: https://github.com/intuit/karate#table
But I think you are over-complicating things. You should just do this:
And path 'api/fire/v' + version + '/sms/otp', res.challengeID
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments