Thank you orde...it works On Tue, Nov 16, 2010 at 2:40 AM, orde <ohil...@gmail.com> wrote:
> You should be able to capture the action attribute like this: > > action_attribute = @browser.form(:name, "mainForm").action > > Hope it helps. > > orde > > On Nov 15, 8:20 am, Shiv <tms...@gmail.com> wrote: > > Hello, > > > > This is my html: > > > > <form name="mainForm" action="/sma/operator/pmanager/pmotion/add.do" > > method="post" old_onsubmit="null" _sfm_form_name="mainForm" > > show_errors_together="true"> > > > > I am using rasta and watir for data driven testing. I want to capture > this > > url in the above html and compare with the url which I get from excel > using > > Rasta to pass my test. > > > > *Problem I am facing is * > > > > I want the action variable in the below watir code to store the string > using > > the action attribute in form element, I have tried with different > > combinations but was unsuccessful > > > > This is my watir code: > > > > def error? > > trigger_link > > action = @@ie.form(:xpath, "//fo...@action']") > > if (@page_name == action) > > puts "#...@page_name} page is available" > > return 0 > > else > > puts "#...@page_name} page is not available" > > return 1 > > end > > end > > def trigger_link > > @@ie.link(:text, @link_name).click > > end > > > > I want the action variable to store the string using the action attribute > in > > form element, I have tried with different combinations but was > unsuccessful > > any help is greatly appreciated > > > > Regards, > > Shiv > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com