ieにはOLEオブジェクトを取得し、Navigateでアドレス指定、Visible=trueにすることで表示を行う。
require 'win32ole'
ie = WIN32OLE.new('InternetExplorer.Application')
ie.Navigate("http://www.google.co.jp")
ie.Visible = true
while ie.busy
sleep 1
end
q = ie.document.all.Item("q")
q.Value = "win32ole"
btnG = ie.document.all.Item("btnG")
btnG.click()
qはページ画面情報
タグ、btnGは検索開始ボタンである。
0 件のコメント:
コメントを投稿