Application Map and Navigation\Utility methods

A

aidy

I have an ObjectMap Class

class ObjectMap
#login
def login;$ie.link:)text, 'Log in');end
def user_name;$ie.text_field:)name, /userid/);end
def password;$ie.text_field:)name, /password/);end
end

I have navigation and utility methods held in modules

i.e.
module Login
@map = ObjectMap.new
def login(username='aidy', password='123')
@map.login.click
@map.user_name.set(username)
@map.password.set(password)
end
end

and test classes

class A_TEST
def initialize

.....
login
.....
end
end

However, when I try to run the test class, I get a "test failed: stack
level too deep".
Not so sure why, Could anyone please help?

Kind Regards

aidy
 
J

Justin Collins

aidy said:
I have an ObjectMap Class

class ObjectMap
#login
def login;$ie.link:)text, 'Log in');end
def user_name;$ie.text_field:)name, /userid/);end
def password;$ie.text_field:)name, /password/);end
end

I have navigation and utility methods held in modules

i.e.
module Login
@map = ObjectMap.new
def login(username='aidy', password='123')
@map.login.click
@map.user_name.set(username)
@map.password.set(password)
end
end

and test classes

class A_TEST
def initialize

.....
login
.....
end
end

However, when I try to run the test class, I get a "test failed: stack
level too deep".
Not so sure why, Could anyone please help?

Kind Regards

aidy
Usually this means you have a deep recursive call somewhere, possibly
accidentally in this case?

-Justin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top