A
aidy
Hi,
I have an ObjectMap class that contains other classes. I inherit from
the base class.Could someone tell me how I can run a nested class
method from the inherited class?
Here is the code:
<snip>
class ObjectMap
@@ie = Watir::IE.new
#each page has a class where objects of that class are mapped
class Login
def username;@@ie.text_fieldname, 'user_name');end
def password;@@ie.text_fieldname, 'password');end
def remember_me;@@ie.checkboxname, 'remember_me');end
def sign_in;@@ie.buttonvalue, 'Sign in');end
end
class DashBoard
#more methods
end
end
class A_Test < ObjectMap
@@ie.goto('www.updatelog.com')
@@ie.maximize
#how do I run the username method?
end
<snip>
Need to, for example, run the username method?
Thanks
aidy
I have an ObjectMap class that contains other classes. I inherit from
the base class.Could someone tell me how I can run a nested class
method from the inherited class?
Here is the code:
<snip>
class ObjectMap
@@ie = Watir::IE.new
#each page has a class where objects of that class are mapped
class Login
def username;@@ie.text_fieldname, 'user_name');end
def password;@@ie.text_fieldname, 'password');end
def remember_me;@@ie.checkboxname, 'remember_me');end
def sign_in;@@ie.buttonvalue, 'Sign in');end
end
class DashBoard
#more methods
end
end
class A_Test < ObjectMap
@@ie.goto('www.updatelog.com')
@@ie.maximize
#how do I run the username method?
end
<snip>
Need to, for example, run the username method?
Thanks
aidy