There is a strong community of Watir users in Bangalore: at Qantom, ThoughtWorks and Honeywell, to name just a few companies. There is also a strong community of Watir users there. I believe the [EMAIL PROTECTED] is the place to learn more.

Bret

At 07:04 AM 8/26/2005, Nishita Acharya wrote:

hello,
       thanks for replying . but i want to know
1>how data can be read into a variable.Incase i have a combo box which has values>>
       Active,Inactive,Suspended,Confirmed.
       If i have to hard code it then the code will look like this:

$ie.select_list( :name ,"body:adminView:form3:lstStatus").select("Inactive")

I have a .txt file from which am reading Inactive then how do i do it?
       my text looks like this

     /* exp.txt
               data1
               data2
                Inactive            */

       i tried this:
                            a=IO.readlines("exp.txt")
                            i=a.length
                           j=0
                            loop do
                                          #read data 1...it is text field
j++
                                         #read data 2...it is text field
                                             j++
                                            c=a.gets
                                             j++
                                            c=a[j]
$ie.select_list( :name ,"body:adminView:form3:lstStatus").select(c)
                                     break if j>= i
                           end
  i get this error

  1) Error:
test_print_assertion(TC_qual_assert):
Watir::Exception::NoValueFoundException: No option with text of Inactive in this select element


2> if doing the above isnt possible then i want to know how it can be read from a csv and then broken into diff fields and read separately
eg:
    data1,data2,Inactive-------is my csv
3> give me the code for dealing with javascript alert boxes

plz reply as soon as possible am stuck up here and cant seem to continue


Regards,

Nishita Acharya
Bangalore.


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_____________________
 Bret Pettichord
 www.pettichord.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to