Actually I had one scenario in which I need to use a variable inside while loop in eval block and the value for that variable changes in every iteration. So is it possible to get the value of that variable from another feature file ?
Feature: Testing API with multiple different URL's
Scenario: Testing
* def URLforTesting = {testURL : 'Google.com'}
* eval
"""
while(URLforTesting!=null)
{
karate.call('xyz.feature',URLforTesting )
URLforTesting = ??? // Is there any way I can update this variable
inside loop with a value that got generated in
another feature file ?
}
"""
In this feature file I will be calling an API and passing URL in argument. In its response I will be getting the next URL(Pagination)
FYI : I had one function in feature file xyz.feature which returns the value in same format as it requires for URLforTesting . Just the thing is I am not able to fetch that value from xyz.feature