Wednesday, October 6, 2010

open IE without watir

require 'win32ole'
ie1 = WIN32OLE.new('InternetExplorer.Application')
ie2 = WIN32OLE.new('InternetExplorer.Application')
ie1.visible = true
ie2.visible = true
ie1.navigate('http://www.google.com')
sleep(1) until ie1.ReadyState == 4
ie2.navigate('http://www.yahoo.com')
sleep(1) until ie1.ReadyState == 4
ie1.Document.All.q.Value = 'Vijay Ramane'
ie1.Document.All.btnG.click
sleep(1) until ie1.ReadyState == 4

No comments:

Post a Comment