Jump to content
WAPT Forum
Guest RobertNegrete

JSON Parameters

Recommended Posts

Guest RobertNegrete

Hi,

 

I'm trying to make an scenario at a web application that uses a lot of json, my first challenge was to make a list of parameters for codes, an then use the selected code an pass it to the next step, however I can't do that. Can you help me pls?

 

Here I will try to explain how I'm doing:

 

Step 6:

 

parameters

 

parameter_name: obj

parameter_value: $LRand({"hotelCode":"FIN","languaje":"es"},{"hotelCode":"ECA","languaje":"es"})

 

variables

variable_name: hotel

variable_value: $Search({"hotelCode":",",,0)

 

Step 7:

I try to use the variable "hotel"

{"hotelCode":$Var(hotel),"languageCode":"es","posCode":"CRMX"}

 

 

and finally I run the test...

 

at the logs I found the same: {"hotelCode":$Var(hotel),"languageCode":"es","posCode":"CRMX"} and I expected {"hotelCode":"ECA","languageCode":"es","posCode":"CRMX"} or {"hotelCode":"FIN","languageCode":"es","posCode":"CRMX"}

 

Probably I'm missundersanding the parametrization examples.

 

Please can you help me.

 

Regards.

Share this post


Link to post
Share on other sites
Guest aczuczor

Hi,

 

I'm trying to make an scenario at a web application that uses a lot of json, my first challenge was to make a list of parameters for codes, an then use the selected code an pass it to the next step, however I can't do that. Can you help me pls?

 

Here I will try to explain how I'm doing:

 

Step 6:

 

parameters

 

parameter_name: obj

parameter_value: $LRand({"hotelCode":"FIN","languaje":"es"},{"hotelCode":"ECA","languaje":"es"})

 

variables

variable_name: hotel

variable_value: $Search({"hotelCode":",",,0)

 

Step 7:

I try to use the variable "hotel"

{"hotelCode":$Var(hotel),"languageCode":"es","posCode":"CRMX"}

 

 

and finally I run the test...

 

at the logs I found the same: {"hotelCode":$Var(hotel),"languageCode":"es","posCode":"CRMX"} and I expected {"hotelCode":"ECA","languageCode":"es","posCode":"CRMX"} or {"hotelCode":"FIN","languageCode":"es","posCode":"CRMX"}

 

Probably I'm missundersanding the parametrization examples.

 

Please can you help me.

 

Regards.

Share this post


Link to post
Share on other sites
Guest aczuczor

Dear All,

 

i have the same problem. I would like to generate custom JSON request with variable but i did not find any information how should i realize that.

 

Can you please help me or send an example?

 

Thank you

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...