Despite working in IT for almost 2 years now I consider myself a
programming novice. Its probably my art degree. Anyway, I’m having
trouble figuring out what is going on here.
I’m using Watir here, but I suppose this would hold true with any
To give a little background. As far as I can tell, the Watir module
holds the IE class which holds the WinClicker class
This is the code:
This will throw an error saying that the constant WinClicker is
Now, if I do this
It also works with:
However, it is not a good idea to include Watir. In 1.6.2 of watir,
including it can break scripts and I’m told its generally a poor idea to
include at the global level.
If I use:
I get a warning in the way I am referencing the toplevel class
My questions are:
- What is Watir::IE doing in the second code example that allows me to
then use WinClicker
- Is doing a Watir::IE the same as including Watir?
- What does that warning when referencing Watir::IE::WinClicker imply
and what problems can arise from doing that?
- If anyone knows, how should I be dealing with the creation of new
WinClicker objects so as to avoid the warning AND avoid including Watir.
Thanks a million.