Is there a way to execute apis based on condition:
<code>Scenario:
And path 'path1'
And request {}
When method post
Then status 200
{execute get1 if condition is true and execute get2 when condition is false}
#get1
And path 'path2'
When method get
Then status 200
#get2
And path 'path3'
When method get
Then status 200
</code>
<code>Scenario:
And path 'path1'
And request {}
When method post
Then status 200
{execute get1 if condition is true and execute get2 when condition is false}
#get1
And path 'path2'
When method get
Then status 200
#get2
And path 'path3'
When method get
Then status 200
</code>
Scenario:
And path 'path1'
And request {}
When method post
Then status 200
{execute get1 if condition is true and execute get2 when condition is false}
#get1
And path 'path2'
When method get
Then status 200
#get2
And path 'path3'
When method get
Then status 200
I have tried conditional statements using ternary operator but I am unsure how to execute a block of code there.