The below code validates the order of items in a drop down. You should
be able to pull some stuff out of here.
when "Item Order"
#Set counter
actual_order = ""
if order_of_items != nil
excel_item = order_of_items.split('|')
else
excel_item = ""
end
if object_id.getAllContents == excel_item
#Field was Disabled
$ts_worksheet.range($pass_fail+$ts_row_nbr.to_s).Value =
"Pass"
$ts_worksheet.range($results+$ts_row_nbr.to_s).Value =
"The "+action+" items ("+label+") were displayed in the expected order"
else
object_id.getAllContents.each {|item|
actual_order = actual_order+"|"+item
}
$ts_worksheet.range($pass_fail+$ts_row_nbr.to_s).Value =
"Fail"
$ts_worksheet.range($results+$ts_row_nbr.to_s).Value =
"The "+action+" items ("+label+") were not displayed in the expected
order. - Actual Order ("+actual_order[1..-1]+")"
end
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Jason Shelton
Sent: Thursday, February 12, 2009 11:29 AM
To: [email protected]
Subject: [wtr-general] Drop down Contents
All,
I am writing to ask if anyone has a quick way of verifying the contents
of a drop down. I have a list of names, and I want to verify that each
name is being displayed in the drop down. Thanks in advance for all of
your help.
- Shelton
________________________________
Windows Live(tm): Keep your life in sync. See how it works.
<http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks
_022009>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---