From: "Peña, Botp" Date: 2008-05-20T17:09:19+09:00 Subject: Re: Watir: Need help in defining a dynamic array From: Anukul Singhal [mailto:anukul.singhal@gmail.com] # Can anyone help me create a dynamic array and store the hwnd to it as # and when a browser is open? Even if you can help me with the basics of # using a dynamic array, I would be satisfied. ruby arrays are dynamic. ff is a simple example. it just automatically stores 5 watir instances in the array. fr then on, you can access each instance or browser by just referencing the array... a=[] #=> [] 5.times do a << Watir::IE.new end #=> 5 a.first.goto "www.google.com" #=> 2.032 a.last.goto "www.yahoo.com" #=> 9.719 a.first.url_list #=> ["about:blank", "http://www.google.com.ph/"] a[1].url_list #=> ["about:blank"] a.last.url_list #=> ["about:blank", "http://www.yahoo.com/"] kind regards -botp