Answered

I keep on getting "Invalid Condition Step" for using IF and it wont let me save the script

I keep on having this issue on proof while using if condition. Proof will not let me save my script until I have ended the if condition. Sometimes even after using end if, multiple times, proof will not let me save it. It also gives the error message “Invalid Condition Step” for the wrong step.

I am working on this script, I where I am working on line 50, before that I had saved and run the script. I have added enough End ifs, but it will not let me save the script and gives error for line 240.

 

Requested information

Response

Name of user

 Nowshin Nur Pial

PROOF user account name

Nowshin

Test Case name/ID/location

ID: 8703

Affected Test Step in Test Case (if applicable)

Step 240

Data Set used (if applicable)

BT3_OLTPTST_ProxyAcct

Execution Set used (if applicable)

 

Browser used for Local/Cloud Run (if applicable)

Chrome for SSL

Issue

Error message:

 

“Invalid Condition Step”

 

 

 

0
4 comments

Official comment

Avatar
Rex Feizi

Hi. 

 

1. The validation kicks-in depending on what the user is doing, so most likely it kicked at a time when it wasn't expected. Would it be possible to provide us with reproducible steps? 

 

2.  Yes, this is a known issue wherein long test cases users lose track of what they were doing. We are adding colorization to keep track conditional and for loop blocks as well as, targetted steps. Hope this helps and please let us know if there are alternative ways that you think we can handle this better. 

Comment actions Permalink
Avatar
Payam Fard

The best way to handle If's and Loop's is to add 2 steps at a time. If and End_If, Loop and Loop_End as soon as they are added to any scripts. This method will also make potential errors less likely in case you have nested If's or nested Loop's. The reason it does not let you save the script after just adding If is that without End_If, the script is not correct and hence cannot be saved. Need more information about Invalid Condition Step and when you get it. It would be great to post the condition here to see why that is. Looking at your test case now, it looks like you were able to save it so I am assuming the issue is resolved already by adding the proper number of End_If's.

0
Comment actions Permalink
Avatar
Nowshin Pial

There are 2 issues that I and few of my team mates have faced while using if

1. Even after using correct number of End_if, the script does not let me save. It does not always happen, but it happened to me and few of my team mates, couple of times. I was able to resolve this issue by using End_if just after starting an IF, and putting the conditions in the middle. 

2. I was adding few new conditions on line 50 of the script. The script is 300 lines long. When I did not put enough End_if for that loop on line 50, and tried to save it, the page would refresh and bring me at the end of the script on line 300, and give the error message "Invalid conditional step at line 300" I then loose the line where I was working previously, and have to look through the script to find where I was working. This was very frustrating specially when I had enough End_ifs and it would still not let me save. Then I had to close the script and open it back again and do the whole thing from the beginning. 

0
Comment actions Permalink
Avatar
Nowshin Pial

1. @Rex, It happens very randomly so, I wont be able to provide a reproducible step. But it does happen very often, I had this issue 3-4 times while I was scripting and few of my other team mates had the same problem.

0
Comment actions Permalink

Please sign in to leave a comment.