undefined method `element_name', dubble inherit

F

Flaming Flamingo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top