Forum Discussion

ralyn_sg's avatar
ralyn_sg
Contributor
10 years ago

Invalid position of the Else operation. This operation can be used only after operations with a condition

Hi 

I tried to include an IF else statement in my keyword test.But I am getting the error mentioned in the subject.How can I resolve this?Any thoughts?



Thanks

6 Replies

  • VLapidus's avatar
    VLapidus
    Frequent Contributor
    Hello,



    It seems that there is an operation between the If... Then and Else statement. Shift this operation one level to the right to make it a child of If...Then.
    • bhakti's avatar
      bhakti
      Contributor

      Hi I am also facing the same issue.

       

      I have tried following still getting invalid position of Else opration:

       

      1) Defined else statment after if ...then on same level

               If.. Then

                  Steps

              Else

                  Steps

       

      2) Set else child of if then

       

               If.. Then

                   Steps

                   Else

                      Steps

       

      • joseph_michaud's avatar
        joseph_michaud
        Moderator

        Pictures help...

         

        This is wrong:

        no1.PNG

         

        This is also wrong:

        no2.PNG

         

        This is right:

        yes.PNG

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    See the attached screenshot - your IfThen and Else need to be aligned on the left.