I believe it depends on how you write your code. For instance, the following will launch an IE session, and then get data out of excel file and dump it in respective session:

def test_getExcelBugs
    excel = WIN32OLE::new(' excel.Application')
    workbook = excel.Workbooks.Open('C:\ruby\watir\watir-v1_4\examples\logging\_Bugs.xls')
    worksheet = workbook.Worksheets(1)
    worksheet.Select
    excel['Visible'] = true
   
    line = '2'
    data = "">    while worksheet.Range("a#{line}:j#{line}")['Value']
       #data << worksheet.Range("a#{line}:j#{line}")['Value']
     
       #data.each { |x| print x,  "\n\n\n".chomp }
       
#Set variables
    start
    project_Number = worksheet.Range("a#{line}")['Value']
    add_ShortDescription = worksheet.Range("b#{line}")['Value']
   
   
    $logger.log("")
   
    $ie = IE.new
    $ie.goto(project_Number)
    $ie.button(:name, "Submit1").click
    $ie.text_field(:name, "ShortDescription").set(add_ShortDescription)
   
       line.succ !   
  end

Since i took out some of the confidential stuff, the function looks considerably short due to that :=)



On 2/22/06, Xi Chen <[EMAIL PROTECTED]> wrote:
Hi

I have looked at FAQ about invoking separate IE instances using Watir.
However I found it doesn't work. For example I tried to open up 10
different browser with a textfield in each of them. I tried to write
some text in the text_field. All the text are writen into the textfield
in the last IE.

Anyone please help?


Xi Chen

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



--
Saud Aziz

"Whenever you find yourself on the side of the majority, it is time to pause and reflect." - Mark Twain



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

Reply via email to