Thanks Zeljko, With xpath, I could easily detect 'Reset' Button' .Here I am using "@href" ie.link(:xpath,"//a...@href='login.jsf']/").click #Click Reset Button
But for The Buttons Submit,Menu, I am using "onclick"(onclick value for Submit which is unique for Submit--Verified with source) Submit Button ie.link(:xpath,"//a...@onclick='var a=function(){this.blur();setPwd ();};var b=function(){if(typeof jsfcljs == 'function'){jsfcljs (document.getElementById('loginForm'),{'j_id75':'j_id75'},'');}return false};return (a()==false) ? false : b();']/").click Even though onclick value for Submit is unique, I am still getting this Error: Unable to locate element, using :xpath, "//a...@onclick='var a=function() {this.blur();setPwd();};var b=function(){if(typeof jsfcljs == 'function'){jsfcljs(document.getElementById('loginForm'), {'j_id75':'j_id75'},'');}return false};return (a()==false) ? false : b ();']/" (Watir::Exception::UnknownObjectException) Zeljko, Can I use Regular Expression for xpath? can I use multiple attributes for xpath? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---