Hi All, I use below code for login.
def login(user_id, password, module_table_id, module_name, page_table_id, page_name) @ie = Watir::IE.new @ie.goto $url @ie.maximize @ie.bring_to_front @ie.text_field(:id,"txtUserName").set user_id @ie.text_field(:id,"txtPassword").set password @ie.button(:id,"btnSubmit").click @ie.table(:id,module_table_id).cell(:text,module_name).fire_event ("onMouseOver") @ie.table(:id,page_table_id).cell(:text,page_name).click @ie.form(:id,"form1").flash end Above function works good. But each and every time i have to change the "module_table_id" and "page_table_id" as per user role rights. it really kills. I want to modify the function more simple and reusable. I expect a function like below. def login(user_id, password, module_name, page_name) end I used regular expression in both table IDs, but it didnt work. So please throw some light on this issue. Thanks, Prince3105 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---