Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a question about IE automation in perl. I did gone through win32::ole and win32::ieautomation but both of them talkes about navigating a specific page and fetching the result from it. Instead of this I want to open up a IE browser->write my result->save->close it much like what we do in case of perl excel, but I am not able to figure out how to write the result in the browser document ...
Code I have been managed so far ... with the help of http://www.perlmonks.org/?node_id=393252#!/bin/perl use strict; use Win32::OLE qw( EVENTS in with valof ); use Win32::OLE::Variant; Win32::OLE->Option( Warn => 0 ); my $IE = Win32::OLE->GetActiveObject( 'InternetExplorer.Application' ) +; if( ! defined $IE ) { print "Can not find open object. Creating one...\n"; $IE = Win32::OLE->new( 'InternetExplorer.Application', "Quit" ) or die "Unable to create a IE Object\n"; } Win32::OLE->WithEvents( $IE,'DWebBrowserEvents2' ); $IE->{Visible} = 1; $IE->{RegisterAsDropTarget} = 1; $IE->{RegisterAsBrowser} = 1; my $Doc = $IE->{Document}; ### This is what I am trying to print the line to he browser page....S +orry, have not much idea ### $Doc->{value} = "This is test automation page"; my $filename="test_auto.html"; $IE->SaveAs($filename); $IE->Quit();
Do you have any idea, how to move further ... please help.
Thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IE Automation
by Anonymous Monk on Nov 18, 2009 at 21:00 UTC |