Hi
I have defined Object Repository file as follow
---------------------------------------------------------
*module LoginPage*
* def username_textbox*
* *
* return $ie.text_field(:id,"i0116")*
* end*
*
*
* def UserPassword*
* return $ie.text_field(:id,"i0118")*
* end*
*
*
* def SignIn*
* return $ie.button(:value,"Sign in")*
* end*
*
*
*end*
-----------------------------------------------------------------
*But when i try to use above definition in other script file as follow*
---------------------------------------------------------------------
username_textbox.set(record['UserName'])
---------------------------------------------------------------------
I get the following error during execution
*
*
---------------------------------------------------------------------
Error: test_login(Login)
NoMethodError: undefined method `text_field' for nil:NilClass
D:/DavidBrown/ObjRep/LoginPage.rb:4:in `username_textbox'
1: module LoginPage
2: def username_textbox
3:
=> 4: return $ie.text_field(:id,"i0116")
5:
6: end
7:
LoginUsingObjRep.rb:24:in `block in test_login'
LoginUsingObjRep.rb:21:in `each'
LoginUsingObjRep.rb:21:in `test_login'
---------------------------------------------------------------------
Kindly advise what is wrong in above code?
Thanks
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]