reloading a web page

J

Jeffrey Bowen

I am trying to load up some stock charts for a quick
review. I can load the pages without a problem.
However I get three open pages where I want to open
and then reload. Any thoughts? The following give
this error "open_web.rb:10:in `method_missing':
Unknown property or method `reload'
(WIN32OLERuntimeError)

require 'win32ole'

symbol = ['xle', 'xlf']
web_page =
WIN32OLE.new('InternetExplorer.Application')
web_page.visible = true
web_page.navigate("http://finance.yahoo.com/charts#cha...hlc;crosshair=on;logscale=on;source=undefined.")

symbol.each do |x|
sleep 10

web_page.reload("http://finance.yahoo.com/charts#cha...hlc;crosshair=on;logscale=on;source=undefined.")
end



____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222
 
C

Carlos

I am trying to load up some stock charts for a quick
review. I can load the pages without a problem.
However I get three open pages where I want to open
and then reload. Any thoughts? The following give
this error "open_web.rb:10:in `method_missing':
Unknown property or method `reload'
(WIN32OLERuntimeError)

require 'win32ole'

symbol = ['xle', 'xlf']
web_page =
WIN32OLE.new('InternetExplorer.Application')
web_page.visible = true
web_page.navigate("http://finance.yahoo.com/charts#cha...hlc;crosshair=on;logscale=on;source=undefined.")

symbol.each do |x|
sleep 10

web_page.reload("http://finance.yahoo.com/charts#cha...hlc;crosshair=on;logscale=on;source=undefined.")
end

Here you have documentation about the #navigate and #refresh methods:

http://msdn2.microsoft.com/en-us/library/aa752093.aspx
http://msdn2.microsoft.com/en-us/library/aa752098.aspx

But to control Internet Explorers, I think you should be using Watir:

http://wtr.rubyforge.org/

It makes the task incredibly easy.

Good luck.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top