From: "Jesús Gabriel y Galán" Date: 2007-10-24T18:37:48+09:00 Subject: Re: Watir and Inheritance On 10/23/07, Mario Ruiz wrote: > I'm trying to do this: > ----------------------------- > require 'Watir' > > class Navigator def initialize(maxim) > @maxim=maxim > @iex=Watir::IE.new > end > def go(url) > @iex.goto(url) > if @maxim==1 then > @iex.maximize() > end > end > end > > naveg=Navigator.new(1) > naveg.go("http://www.google.es") > > puts naveg.url > -------------------------------- > I want my 'naveg' object can display the methods and properties of > wakir, url for example. What am I doing wrong? I think what you are doing wrong is having a Watir::IE object inside your Navigator class. If you inherit from IE you have all methods in IE available so you don't need to wrap another instance of IE inside. Can you try this (not tested): require 'Watir' class Navigator