On Tuesday, July 21, 2015 at 5:24:04 AM UTC-7, Mahesh Mesta wrote: > > I'm using watir to perform automated testing for an application and trying > to click on a submit button once I select options for select list and fill > up the form.However on clicking the button, it throws element not found > error > > > The html snippet for button tag > > <button type="submit" class="md-primary md-raised md-button md-default- > theme" ng-transclude=""><span class="ng-binding > ng-scope">Submit</span><div style="" class="md-ripple-container"></div> > </button> > > The ruby script > > require "watir"require "watir-webdriver" > browser = Watir::Browser.new :firefox > browser.goto 'https://54.69.254.137/webui#/landing' > browser.driver.manage.window.maximize > browser.button(:class =>'sign-in md-button md-default-theme').click > browser.text_field(:id =>'input_001').set('[email protected] <javascript:>') > browser.text_field(:id =>'input_002').set('password') > browser.button(:class =>'md-primary md-raised md-button md-default- > theme').click > browser.input(:id =>'input_002').when_present.click > browser.element(aria_label:'What do you want to do?').when_present.click > browser.element(:id =>'select_option_00G').when_present.click > browser.element(aria_label:'About what?').when_present.click > browser.element(:id =>'select_option_00P').when_present.click > browser.textarea(:id =>'input_00N').when_present.set('Discuss about > javascript and later test the application??') > browser.button(:class =>'md-primary md-raised md-button md-default- > theme').click > > It throws the following error > > Selenium::WebDriver::Error::ElementNotVisibleError: Element is not > currently visible and so may not be interacted with > > > I tried using > > browser.button(:class =>'md-primary md-raised md-button md-default- > theme').when_present.click > > ,but it will throw time out error.Not able to rectify the error .Plz help > !! >
-- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
