reloading a web page

Discussion in 'Ruby' started by Jeffrey Bowen, Aug 5, 2007.

  1. 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;indicator=sma(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;indicator=sma(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/collections/222
    Jeffrey Bowen, Aug 5, 2007
    #1
    1. Advertising

  2. Jeffrey Bowen

    Carlos Guest

    [Jeffrey Bowen <>, 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;indicator=sma(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;indicator=sma(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/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.

    --
    Carlos, Aug 5, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Walter
    Replies:
    2
    Views:
    436
    Walter
    Dec 22, 2003
  2. Urs Vogel
    Replies:
    2
    Views:
    2,392
    Urs Vogel
    Jun 10, 2004
  3. Richard
    Replies:
    3
    Views:
    534
    Richard
    Jul 22, 2004
  4. pTsy

    asp.net page reloading

    pTsy, Oct 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    12,494
    James
    Oct 7, 2004
  5. =?Utf-8?B?Sm9zaHVhIFdlaXI=?=

    variables in memory and reloading a page

    =?Utf-8?B?Sm9zaHVhIFdlaXI=?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    360
    Hans Kesting
    Oct 11, 2004
Loading...

Share This Page