Share
Go down
zlos7ar
Amateur
Amateur
Posts : 41
Join date : 2012-01-13
Age : 30
Location : Germany

[solved]if statement

on Thu Feb 16, 2012 5:06 pm
hey guys how can I say something like this in selenium IDE

If (bool = true) {
//continue the test
}
else {
//send error report
}

or some other way to check if the value of bool is true ?


Last edited by zlos7ar on Thu Feb 16, 2012 5:37 pm; edited 1 time in total
zlos7ar
Amateur
Amateur
Posts : 41
Join date : 2012-01-13
Age : 30
Location : Germany

Re: [solved]if statement

on Thu Feb 16, 2012 5:37 pm
I solved that myself ;]

I used this extension: http://www.computerminds.co.uk/automating-boring-tasks-selenium-ide

store true true
gotoIf ${bool}==${true} continue
label continue

I hope thats correct ;]]
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: [solved]if statement

on Sat Feb 18, 2012 1:43 am
That is a great extension! It's definitely nice to have conditional statements in IDE. Unfortunately I don't think it works if you try running your scripts from the command with RC.
zlos7ar
Amateur
Amateur
Posts : 41
Join date : 2012-01-13
Age : 30
Location : Germany

Re: [solved]if statement

on Mon Feb 20, 2012 3:42 pm
Yep unfortunately it does not work in RC.
rashmichauhan
Posts : 3
Join date : 2012-10-03

How to IF ELSE condition use Selenium IDE

on Wed Oct 10, 2012 6:15 pm
hi Can you please suggest me how to insert IF ELSE condition in my case.

Code:
open  /Login.aspx
    type id=LoginCtrl_UserName chetanmistry
type  id=LoginCtrl_Password chetanmistry
clickAndWait  id=LoginCtrl_LoginButton
    clickAndWait  link=Reporting
    clickAndWait  link=Messenger
    clickAndWait  link=Campaign Management
    clickAndWait  link=Customer Management
    clickAndWait  link=User Management
    clickAndWait  link=System Administration
    clickAndWait  link=Personal
    clickAndWait  id=ctl00_loginStatus

In my case some user have right to see Campaign Management page, Some
user have right to see Messenger page, some have right to see User
management like this.
When I run common script after changing user name and password. The script
gone fail because the same page is not available for all user. I want
to develop if the page not found in the user profile then script will
end successfully.


Please help me.

Regards
Rashmi Chauhan.
Sponsored content

Re: [solved]if statement

Back to top
Permissions in this forum:
You cannot reply to topics in this forum