vendredi 15 juin 2018

Is there a way to use conditional if in karate?

 string checkSeoEnable = get gettingFooterData[*].enable_for_seo
   print "********************" + checkSeoEnable
   eval if (checkSeoEnable == "true") karate.call
   def citiesNearbyJsonInsideLinksArray = get linksArrayInsideContent[?(@.title=='CITIES NEARBY')]
   print citiesNearbyJsonInsideLinksArray
   json citiesNameInsideCitiesNearBY = get citiesNearbyJsonInsideLinksArray[*].content[*].area.city
   print "Cities Present in the Cities BearBy" + citiesNameInsideCitiesNearBY

I want that if checkSeoEnable == "true" only then the code runs further.

Any ideas?

Aucun commentaire:

Enregistrer un commentaire