Forum Discussion
In your diagram, you need to take everything included under your green arrow and indent it right. Then it will be included in the Data Driven Loop.
You can tell what's in the loop by looking at the faint line that goes down the left. Anything you want in the loop can't be on the same level as the loop.
- Iso_Yura2 years agoContributor
It's already in the loop. I selected everything and tried move it to the right but it doesn't let me do it.
- Marsha_R2 years agoModerator
I would try the two If Then sections like this instead
If ... Then
Else
If... Then
If that doesn't work, then put some debug statements before and after each step of the two IF statements to make sure that the variables you are testing on actually contain the values you expect. You may be accidentally comparing string to number or have some other mismatch.
- Iso_Yura2 years agoContributor
Not it works, but not how I need to.
I have DDL test:
step 1
step 2
step 3
step 4
If...Then
run test A
Else
run test B
Now it executes all 4 steps, then it gets to If statement, which is True, then it runs test A.
After that it runs again 4 DDL steps(that's what I need) but then it runs again test A.
It shouldn't run test A, as condition is False now. It should run test B.
My test creates a new project, where project name is a variable stored in csv file, this is what my data driven loop does, each line in csv file is a project name.
After I created first project A, it should run DDL test where it reads project name from csv file, then I store project name into a variable X, then it gets to the condition where I check if variable X is == project name, in instance if X==new project1 then run test A, if X==new project2 then run test B.
Every time when it runs through DDL steps it takes a project name as "new project1", "new project2", "new project3" and "new project4". It stores it into variable X, then it compares if X==new project1, and so on.
In my If statement condition I have If X == "variable from DB Table", I'm expecting that it compares X with value in DB Table, this is new project1, new project2, basically those values are the same as I use for data driven loop(DDL).
Related Content
- 3 years ago