Here is how got read of my dialog box....
--------Main script---------
# set a variable
def execute_and_click_dialog(extra_file, &block)
Thread.new { system("rubyw
\"#{$mydir}\\#{extra_file}.rb\"") }
block.call
end
$ie=Watir::IE.new
..
..
..
execute_and_click_dialog('DialogPressHelper'){
$ie.frame("mainFrame").link(:index,i).click}
..
..
..
-----------------Main script ends------------------
Helper script follows...this is nothing bug copy of is just renamed
jscriptExtraAlert.rb
to make my script more redable...
---------------------DialogPressHelper.rb-------------
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
require 'watir/WindowHelper'
helper = WindowHelper.new
helper.push_alert_button()
----------------------DialogPressHelper.rb....ends----------
Check out push_security_alert_yes() in WindowsHelper.rb in Watir
sources for exact solution to you problem.
Hope this helps.
Regards,
Manish
On 10/29/2005 04:44 AM, Dale Herrig wrote:
> Forum,
>
> I have a scenario where a security alert dialog box pops up and I need
> to select the yes button. I have not been able to figure out a way to
> select these the buttons in these security alert dialogs. Does anybody
> now how this might be accomplished.
>
> Thanks
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general