Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
undefined method `element_name', dubble inherit
Flaming Flamingo
9/18/2008 10:50:00 AM
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.n...
)
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.n...
)
puts ff.links.length
ff.link(:href, "/news/1749816/10/
Veel_steden_zondag_autovrij.html").click
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
undefined method `element_name', dubble inherit
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password