Forum Discussion

acchu12b's avatar
acchu12b
Occasional Contributor
11 years ago
Solved

Handling web page objects through if loop or any

Hi 



I am creating a key word test and have a scenario as below:

if (condition)

 choose item1 in the webpage

Else

  choose item2 in the webpage



The issue here is even if my condition is not satisfied, all statements gets executed.

Please advice how to handle web object actions after if loop

 
  • Your snippet is cut off at the left side so it's hard to tell, but I think your detail statements arent aligned with IF properly.  Take a look at my attachments. 

4 Replies

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    Your snippet is cut off at the left side so it's hard to tell, but I think your detail statements arent aligned with IF properly.  Take a look at my attachments. 
  • acchu12b's avatar
    acchu12b
    Occasional Contributor
    Hi, 



    Thanks for your reply.

    Can you please guide me on how to add the browser actions as children of "if loop", because, when I add if loop to the browser action, it goes above the browser action, but dosn't become the parent of it. I have attached my screen shot to show this.

    Please advice
  • acchu12b's avatar
    acchu12b
    Occasional Contributor
    Thanks, I got it done by myself. Just drag the browser item over the if loop and it will become child of if loop, which will process the flow,as expected.

    Your snippet showed that we can do this for sure and I tried further for mine.

    Thanks a ton!