Hi Tiffany,
thanks and no confusion, we are on the same page.

$addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")

$addNotification.each do |notification|
 if notification['Priority'] == 'Urgent'
   $ie.select_list( :name , "tusers").select(record["Select_Users"]) # here
it gets only 1row but i want it to get all rows, can you please provide me
the syntax.
   $ie.button(:name,"select").click

thanks

On Wed, Dec 9, 2009 at 9:54 AM, Tiffany Fodor <tcfo...@comcast.net> wrote:

> Hi Venky,
>
> The formatting on your example data was lost, so it's hard to see
> exactly what you mean.  It seems you're trying to gather the data
> conditionally based on the priority.  I'd suggest grabbing all the
> data - make your range A1:E6 - and then deal with the data in your
> code.  The headings in row 1 will be the hash keys you use to get at
> the data in each cell of the subsequent rows.
>
> $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> $addNotification.each do |notification|
>  if notification['Priority'] == 'Urgent'
>    #do whatever you need to with 'Urgent' priority users
>  elsif notification['Priority'] == 'High'
>    #do whatever you need to with 'High' priority users
>  else
>    #do whatever you need to with other users
> end
>
> Hope this helps!
>
> -Tiffany
>
>
> On Dec 8, 6:39 am, venkat <greet.ven...@gmail.com> wrote:
> >  Can any one please help me out in getting the multi row data from a
> column
> > using watir xls interface class.
> >
> > I have taken the DataDrivenTestHarnessExample as my source from Watir
> > OpenQA.
> >
> > I have added test data into a sheet "Sheet4"
> > Sheet4 has columns with data as follows.
> >
> > A                        B                       C
> > D                              E
> > Type                   Priority              Select_Users
> > Remove_Users      Yes
> >  Information         High                  User1
> > User1                     No
> >                              Medium
> > User2                  User2
> >                               Low                  User3
> >                                                         User4
> >                                                         User5
> >
> > I have to select the
> >                                Type as "INFORMATIONAL"
> >                             If Priority as Urgent then Select_Users = all
> > (6rows)
> >                            else Priority is other than 'urgent then only
> 2
> > records from column Select_Users .
> >
> > I am using the following syntax to get a row of record.
> > $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
> > but apart from getting the row, i need to get all records from the column
> > 'Select_Users'.
> >
> > Thanking you very much in adavance.
> >
> > Venky
>
> --
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To post to this group, send email to watir-general@googlegroups.com
> Before posting, please read the following guidelines:
> http://wiki.openqa.org/display/WTR/Support
> To unsubscribe from this group, send email to
> watir-general-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to