Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
reloading a web page
jabowen
8/5/2007 4:24:00 AM
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#chart3:symbol=spy;range=3m;ind...
(10,20)+split+macd+volumema(20);charttype=ohlc;crosshair=on;logscale=on;source=undefined.")
symbol.each do |x|
sleep 10
web_page.reload("
http://finance.yahoo.com/charts#chart3:symbol=spy;range=3m;ind...
(10,20)+split+macd+volumema(20);charttype=ohlc;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/colle...
1 Answer
Carlos
8/5/2007 11:20:00 AM
0
[Jeffrey Bowen <ja_bowen@yahoo.com>, 2007-08-05 06.23 CEST]
> 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#chart3:symbol=spy;range=3m;ind...
(10,20)+split+macd+volumema(20);charttype=ohlc;crosshair=on;logscale=on;source=undefined.")
>
> symbol.each do |x|
> sleep 10
>
> web_page.reload("
http://finance.yahoo.com/charts#chart3:symbol=spy;range=3m;ind...
(10,20)+split+macd+volumema(20);charttype=ohlc;crosshair=on;logscale=on;source=undefined.")
> end
Here you have documentation about the #navigate and #refresh methods:
http://msdn2.microsoft.com/en-us/library/aa7...
http://msdn2.microsoft.com/en-us/library/aa7...
But to control Internet Explorers, I think you should be using Watir:
http://wtr.ruby...
It makes the task incredibly easy.
Good luck.
--
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
reloading a web page
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password