Dear all,
I'm making a class that can handle IE as well as FF.
This class is used for our scripts.

When I call this class I can call own def's and standard def goto,
but, not "link".
I made two "scripts", first goes wrong second goes right.


See code:
class BFF < Firefox


        def ggoto(url)
                puts self
                self.goto(url)
        end
        def checklinks
                puts self
                puts self.links.length
        end
        def clicklink
                self.link(:href, "/news/1749816/10/
Veel_steden_zondag_autovrij.html").click
        end


        def talk
                puts "talking FF"
        end
end


class Browser


        def initialize
                @strBType = "FF"


                end


         def BrowserChoice()
                # case select
                  # what browser in start.xls
                # end
                puts "in browserchoice"
                 test = BFF.new


                 return test
         end


end


#link goes wrong.
 browserr = Browser.new.BrowserChoice
 puts browserr
 browserr.talk()
 browserr.goto("http://www.nu.nl")
 browserr.checklinks
 browserr.clicklink
 browserr.link(:href, "/news/1749816/10/
Veel_steden_zondag_autovrij.html").click
#puts browser.links.length


#link works
 ff = FireWatir::Firefox.new()
 ff.goto("http://www.nu.nl")
 puts ff.links.length
 ff.link(:href, "/news/1749816/10/
Veel_steden_zondag_autovrij.html").click
-- 
Posted via http://www.ruby-forum.com/.