Closed hemanth closed 11 years ago
The reason you're getting that error is because watir-classic
has an autoload
statement for IE class, which loads all the code. The code is actually rudimentary and from the times of FireWatir
. It should be removed in the future, but currently you can do something like this if you're using only watir-classic:
require "watir"
Watir.driver = :classic
Watir.load_driver
# trigger autoload
Watir::IE
# your code
I've opened up a separate issue for removing autoload
code https://github.com/watir/watir-classic/issues/47
@jarmo Kool, was almost there, but had to do an Watir::IE
will try it very soon and update.
Update : Super class mismatch for class UnknownObjectException
and in irb undefined method driver for Watir:Module !
Oops, somehow i have missed your reply. Sorry about that.
If you're getting error like that then your monkey patch is wrong or you have loaded Watir-WebDriver. Can you show me your code?
Unable to find the code, but later on Watir.load_driver
did work.
Let the code do the talking :
Same for :
Then, the below code works, after Watir::Browser.new module Watir will be loaded.
So, is there a way to extend the class before
Watir::Browser.new
:question: