서비의 다락방   

TAG ,
ruby 소스

# test.rb

require 'watir'
include Watir

test_site = 'http://localhost/test.html'

ie = IE.new

ie.goto(test_site)

Thread.new { system("rubyw \"jscriptExtraAlert.rb\"") }

ie.button(:id, 'btnAlert').click

ie.close


# jscriptExtraAlert.rb

require 'watir/WindowHelper'

helper = WindowHelper.new
helper.push_alert_button()


HTML

<HTML>

 <HEAD>
 
  <TITLE> New Document </TITLE>
 
  <script type="text/javascript">
    function test(){
        alert('test');
    }
  </script>
 </HEAD>

 <BODY>
 
 <form>
        <input type="button" id="btnAlert" value="clickMe" OnClick="test();" />
       
 </form>       
 
 </BODY>

</HTML>

☆ 정 보 마 당 ☆    

   

TRACKBACK :: http://www.yunsobi.com/blog/trackback/4

댓글을 달아 주세요

1  ... 377 378 379 380 381 382 383 384 385  ... 394 
«   2009/01   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31