Hey thanks for your response but i can't do the following because my actual code (Step Definition) is in separate .rb file under step_definition folder where as my hook file is under support folder. So i can't put my code there.
On Monday, September 23, 2013 6:34:41 PM UTC-4, Ankita@Adslot wrote: > > try using > > browser = [:firefox,:chrome,:safari] > browser.each do |browser| > Before do > $browser = Watir::Browser.new browser > end > > <your code to execute> > > end > > > On Mon, Sep 23, 2013 at 11:44 PM, Mihir Dhandhusaria > <[email protected]<javascript:> > > wrote: > >> All, >> >> I know this is repeated question but i was not able to find solution. I >> have following code in my hook file. When i execute my feature file it open >> all 3 browsers but never executes my features. FYI i don't have following >> code on my step definition i have it separately in hook file to avoid >> duplication >> >> Before do >> browser = [:firefox,:chrome,:safari] >> browser.each do |browser| >> $browser = Watir::Browser.new browser >> end >> end >> >> Can anyone tell me what line of code i need to add here to execute my >> features ? >> Appreciate your help >> >> >> Thanks >> >> -- >> -- >> Before posting, please read http://watir.com/support. In short: search >> before you ask, be nice. >> >> [email protected] <javascript:> >> http://groups.google.com/group/watir-general >> [email protected] <javascript:> >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Watir General" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
