Hi, Could I have some opinions on whether this is a good way to organise my app map?
object_map.rb module Constants URL = "http://portal" USER_NAME = "aidy" #at some time this will be var PASSWORD = "12345" # " " end class LoginWin USER_NAME ='userid' LOG_IN_LINK = 'Log in' PASSWORD = 'password' LOG_IN_BTN= 'Log in' end class MainWin ..... end logob.rb require 'objectMap' def login (username, password) @ie.link(:text, LoginWin::LOG_IN_LINK).click @ie.text_field(:name, LoginWin::USER_NAME).set(username) @ie.text_field(:name, LoginWin::PASSWORD).set(password) @ie.button(:value,LoginWin::LOG_IN_BTN).click end test_1.rb require 'objectMap' require 'browser' require 'logon' start_browser(Constants::URL) login(Constants::USER_NAME, Constants::PASSWORD) Cheers Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
