# Application Map and Navigation\\Utility methods

**URL:** <https://www.ruby-forum.com/t/application-map-and-navigation-utility-methods/98300>\
**Category:** Ruby\
**Created:** [July 13, 2006, 6:43pm UTC](https://www.ruby-forum.com/t/application-map-and-navigation-utility-methods/98300 "2006-07-13T18:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eada6e/32.png) [@aidy](https://www.ruby-forum.com/u/aidy)\
**Post date:** [July 13, 2006, 6:43pm UTC](https://www.ruby-forum.com/t/application-map-and-navigation-utility-methods/98300/1 "2006-07-13T18:43:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aidy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eada6e/32.png) [@aidy](https://www.ruby-forum.com/u/aidy)\
**Post date:** [July 14, 2006, 9:16pm UTC](https://www.ruby-forum.com/t/application-map-and-navigation-utility-methods/98300/2 "2006-07-14T21:16:47Z")

</div>

aidy wrote:

> and test classes  
> 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
