How to pass response variable in path through examples table in karate

anki-flex

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  |   
Peter Thomas

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.

edited at
0

Comments

0 comments
Login to comment

Related

How to Pass URL as Path Variable

How to pass a variable through a function without quotes?

RSpec: How to pass a "let" variable as a parameter to shared examples

How to pass response values to Java API from Karate

How to parse "|" in examples in karate

Karate: how to pass dynamic path parameters?

How to pass variable value in feature line in karate?

How to pass variable into the title of a scenario/scenario title in Karate framework

how to pass a variable while calling a Js function in karate

In Karate Scenario Outline test, how to pass param values in the Examples table through a variable

Karate API framework how to match the response values with the table columns?

Karate how to loop through array and update path param

How to pass a table through a form PHP

How to pass a variable into a file path in PHP

How to pass the variable in attachment array path?

How to pass variable through a function's function

How to pass a Variable through JavaFX Application to the Controller?

How to pass javascript variable through url?

Symfony, How to pass a variable to the path?

How to pass data through table views

How to pass a variable through an EventHandler?

How to pass multiple variable through url in codeigniter?

How to loop through karate response array and pass this in json path of another web service response

How to write the path to the form through a variable?

How to pass a variable AND an API response to the next promise (.then)

How to pass dynamic variable in Scenario outline in Karate DSL

how to pass a variable through url?

How to give # in path in Karate

how to pass and iterate through a list variable in terraform?