Here is my $0.02.

 

lbDocTypeID = []

lbDocTypeID = $ie.frame(:index, 4).select_list( :name,
'DocTypeID').getAllContents

cnt = rand(lbDocTypeID.length)

next if "#{lbDocTypeID}" == ("-- Select Doc Type --")

$ie.frame(:index, 4).selectBox( :name,
'DocTypeID').select("#{lbDocTypeID[cnt]}")

 

--Mark

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sarita
Sent: Tuesday, January 16, 2007 9:39 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] ignoring the SELECT option

 

In a combobox, first option is 'SELECT' for user convenience. Each time
the test is run, a random option is selected from the combobox. For that
I used the following code:

variable = ie.select_list(
:name,"ctl00$ContentPlaceHolder$ddlClientList").getAllContents 

ie.select_list(:name,
"ctl00$ContentPlaceHolder1$ddlClientList").select(variable[rand(variable
.length)])

 

Sometime SELECT option itself can be selected. Then the test fails. Want
to ignore the SELECT option, please help.

 

Regards,

Sarita

---------------------------------------------------------------------

Posted via Jive Forums

http://forums.openqa.org/thread.jspa?threadID=6141&messageID=17224#17224

_______________________________________________

Wtr-general mailing list

Wtr-general@rubyforge.org

http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to