[wtr-general] Re: Unable to click OK confirm popup
This is working now...Implemented as below : message = @page.confirm(true) do @page.button_that_causes_the_confirm end message.should == "Text from the confirm popup" On Tuesday, March 19, 2013 11:24:18 AM UTC, sk.f...@gmail.com wrote: > > Hi, > In my application I've to click on deactivate button which returns a popup > (*Are you sure you want to deactivate this A/B Test? After deactivation, > this test can\'t be activated again.)* with OK and Cancel buttons.I've to > click on 'OK'. > I tried many ways but no luck..Your help is much appreciated. > > Here is the code: > > > A/B Testing > > > > value="18/03/2013" name="config.start" disabled=""> > > > name="config.stop" disabled=""> > > Mode > > > Channel > > > > > > > > > > > > > > > > > > > > Comments > > > > > ** > > > > > > I've tried as below : > 1-- browser.execute_script("window.confirm = function() {return true}") > 2-- browser.alert.ok > 3 --browser.button_submit(:class => "submit120").click > > Error message : > no block given (yield) (LocalJumpError) > > > -- -- 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 --- 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 watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Re: Unable to click OK confirm popup
Hi Alex, I'm using cucumber with ruby.I'm using it in step def as below : Then /^I click deactivate$/ do browser.button(:class => 'submit120').click end Then /^I click confirmation box$/ do browser.execute_script("window.confirm = function() {return true}") # browser.confirm("window.confirm = function() {return true}") browser.alert.ok #browser.button_submit_element(:class => "submit120").wait_until_present #browser.button_submit(:class => "submit120").click end On Tuesday, March 19, 2013 11:24:18 AM UTC, sk.f...@gmail.com wrote: > > Hi, > In my application I've to click on deactivate button which returns a popup > (*Are you sure you want to deactivate this A/B Test? After deactivation, > this test can\'t be activated again.)* with OK and Cancel buttons.I've to > click on 'OK'. > I tried many ways but no luck..Your help is much appreciated. > > Here is the code: > > > A/B Testing > > > > value="18/03/2013" name="config.start" disabled=""> > > > name="config.stop" disabled=""> > > Mode > > > Channel > > > > > > > > > > > > > > > > > > > > Comments > > > > > ** > > > > > > I've tried as below : > 1-- browser.execute_script("window.confirm = function() {return true}") > 2-- browser.alert.ok > 3 --browser.button_submit(:class => "submit120").click > > Error message : > no block given (yield) (LocalJumpError) > > > -- -- 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 --- 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 watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Re: Unable to click OK confirm popup
Provide more of your code like where you put mentioned statements Have you tried the same things from irb? -- -- 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 --- 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 watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.