Ask a Question

Nested if then's

SOLVED
TJ33
Occasional Contributor

Nested if then's

Hi All,

  New to TC so I'll apoligize in advance if this has been asked/answer.  I searched but found little.  Does TC support nested if then else statements?  ie Can I put another If..Then under the Else?  

  I ask b/c as individual If..Then statements I see the behavior I would expect.  As soon as I try nesting these all I ever get is the behavior in the last Else statement.  I 'believe' I have my indentations correct.  It behaves properly when not nested.  

  The scenario I'm attempting is the app will have 1 of 3 random security questions pop up on attempting to login.  Based on that security question, obviously I enter specific text.  

  Thanks in advance.  
NestedIfs.PNG

2 REPLIES 2
tristaanogre
Esteemed Contributor

Yes, you can.   You can nest as many if thens as you want to.  It's just a matter of dragging/dropping the desired If/Then under the parent.

 

nestedifthen.png


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
TJ33
Occasional Contributor

Thank you Tristan, I"ve read quite a few of your posts.

cancel
Showing results for 
Search instead for 
Did you mean: