Forum Discussion

nidlees's avatar
nidlees
New Member
6 years ago
Solved

Dynamic contentText

Hi everyone!

 

Basically I have these 2 scenarios that I'm trying to run:

 

✤ Scenario 1:  I have to buy a product and select a specific credit card to complete the transaction.

✤ Scenario 2: I have to buy a product and select a credit card different from the first one to complete the transaction.

 

Note: these 2 credit cards already have been added to my account and the two options are available on my order checkout. 

 

So, what I'm trying to achieve is how can I make my test to dynamically select the correct credit card (without inserting an "if" validation for each Label). I'm also trying to achieve it from Keyword Tests.

 

Each Label follows the following contentText standard: **** **** **** #. The last 4 digits are the only thing that is different from each credit card. 

 

What I tried to do is included the whole "**** **** **** 8013" in a CSV and tried to set it into a project variable so I could replace the contentText for it, but it didn't work.

 

Any thoughts?

 

image.png

 

Regards,

Nidlees.

3 Replies