in reply to Re^2: Grab text from web page using Win32::OLE
in thread Grab text from web page using Win32::OLE

An update on the previous.
Working with another web page (in.yahoo.com) and adding a sleep 1 after the $ie->get($url) solved the problem of setting a value to a field and submitting the form correctly.
However, the last question remains. Can I open a browser window through Win32::IE::Mechanize, then let the user type the input (e.g. some text for search) and grab this input in some way through this Perl module?

Thanks in advance
  • Comment on Re^3: Grab text from web page using Win32::OLE

Replies are listed 'Best First'.
Re^4: Grab text from web page using Win32::OLE
by ikegami (Patriarch) on Oct 13, 2008 at 14:14 UTC
    I don't know if IE gives access to that. Have you tried it?
      I don't have a clue... I guess your concern is that the browser itself wouldn't let me sneak on the input a user types and submits...?

      If this is the case, is there a workaround?

      The app I need to write should open a browser and navigate the user to a web page. There, the user must create an account by entering username and password. The web page itself will inform them of the success or failure of the account creation.

      Then, I must ask the user to re-type the (approved) username and password in my perl-tk application window. What I try to do is avoid the case that the user enters the wrong credentials in my application. (this is why I want to have the ones from the browser so that I can cross-check and inform them in the case of an error)...
        I think you have it backwards. Ask for the credendtials yourself then feed them to $mech, not the other way around.