How to insert If Else condition infollowing code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to insert If Else condition infollowing code

                                                       
                                                                       
rashmiChauhan
 I am using Selenium IDE for testing my application.

I have sufficient plug in and I am also getting If else option in command drop down in Selenium IDE. Can you please suggest me how to insert If Else condition in recorded script.

The Scenario is that there are 5 rights Campaign Administrator, User Management, Customer Management,  Personal, Reports.
Some users have Campaign Administrator right, Some  User have User  Management right, Some are Customer Management right.

The page display in each type area is different i. e. The page display in Campaign Management is not visible to the user who have right of User Management.
 
After recording script when I playback the same script for other user the script goes fail because the page is not found.

I want to handle this situation with If Else condition if the page is not found then the script skip the section and on place of giving error it's pass.

The code is following :
 

open/Login.aspx
typeid=LoginCtrl_UserNamechetanmistry
typeid=LoginCtrl_Passwordchetanmistry
clickAndWaitid=LoginCtrl_LoginButton</
td>
   
clickAndWaitlink=Reporting
clickAndWaitlink=Campaign Management
clickAndWaitlink=Customer Management
clickAndWaitlink=User Management
clickAndWaitlink=System Administration
clickAndWaitlink=Personal
clickAndWaitid=ctl00_loginStatus
</body>
</html>
 


Regards