Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: How to get DOM from currently open IE browser.

by technojosh (Priest)
on Nov 07, 2007 at 15:41 UTC ( #649501=note: print w/replies, xml ) Need Help??

in reply to Re^2: How to get DOM from currently open IE browser.
in thread How to get DOM from currently open IE browser.

I saw some examples on the web but they all seem to open new IE windows and that does not help me. I need to get to windows that are already open.

My suggestions were for your above issue, those methods I mentioned would help to get you to an IE window that is already open...I apologize if I misread your question.

  • Comment on Re^3: How to get DOM from currently open IE browser.

Replies are listed 'Best First'.
Re^4: How to get DOM from currently open IE browser.
by dadto7 (Novice) on Nov 07, 2007 at 18:30 UTC
    Sorry, maybe I misunderstood what methods you meant. I have used the Win23::GuiTest methods to successfully get the window active/foreground. You can get some rudimentary info like URL, and Window title using the examples I've seen on the net. But no examples I've seen get the innerHTML (See the JavaScript sample in my previous reply to see the type of data I hope to retrieve). A Win32::OLE example would look like below. But the GetActiveObject does not seem to work and that is my real problem.
    my $currDir = cwd; my $url = "file://" . $currDir . "/osmerrors1.html?5,now"; my $IE; $IE = Win32::OLE->GetActiveObject( "InternetExplorer.Application" ); $IE->Navigate($url , 4 ); my $IEurl = $IE->Document->URL;

    But I have not seen any examples yet where you can get to the HTML which is what I need. That is why I asked for the specific method you think will do that and I can try those.

    BTW, you may have noticed this is my first question here so I need to figure out how you got the stuff in italics at the beginning of you last reply. Did you just cut and paste that and surround it with the "code" stuff?

    THX, Nick

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://649501]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-02-28 00:57 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (394 votes). Check out past polls.