in reply to Re: IE Automation with Update Panel
in thread IE Automation with Update Panel

Yes ! A kind of. Presently I am using IEautomation which uses OLE.pm. But, the problem is with the update panel in asp.net ,the source code does not contain the input html tags in the form.If you look into a latest ajax based web page which has an update panel as shown in the link below , and (http://asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx)click on any of the "run" program and takes the source code, you will see that the source code does not contain any data which is displayed on the page. in that case , I like to know how PERL can be used for automation?Is there already a module for supporting this or is there any way to have a work around for this?

Replies are listed 'Best First'.
Re^3: IE Automation with Update Panel
by plobsing (Friar) on Jan 06, 2008 at 03:32 UTC
    What do you mean the <input>s aren't in the source? Are you refering to the server-side ASP code? In that case you should view-source from your browser to get a better picture of what you are dealing with.
    Extract from example 1:
    <div id="UpdatePanel1"> <fieldset> <legend>UpdatePanel content</legend> <!-- Other content in the panel. --> 1/5/2008 10:21:20 PM <br /> <input type="submit" name="Button1" value="Refresh + Panel" id="Button1" /> </fieldset> </div>
      In the page which I mentioned, if you select the section Refreshing an Updatepanel Programatically, and select three Options , then all the answers will appear on the completed questions text Box and when you select the third answer, a submit button will also appear. Finally when you view the source of the page after doing the above, you will see that in the completed Questions section there is no text as well as the button Submit. </script>
      Completed Questions:

      In this case since the source of the page does not show the text as well as the submit button , how do you test in Perl? In some pages, not in the link whih I gave, there are some times fields for <input> like Login Name and Password which we have to enter which will not appear like above in the view source or in the frame.In those cases, is there a way from Perl to input those and test those pages automatically?
        For your example, you are right, the content of interest does not appear in the HTML source of the page. This is because the webpage is being updated with AJAX using this library (I think).

        Here is my (simplified) view of the browser:

        Code From -> (Java)Script -> Internal -> Renderer Internet Engine Document

        What you are seeing with the view-source is the code from the internet. But what you need to be looking at is the internal document output by the script engine.

        I know you can get this using the JavaScript plugin for WWW::Mechanize. I am not familiar with Win32::IEAutomation, but it would seem to me that the Content() method should return the internal document.

        Than you need something that use DOM. And as i realize from Win32::IEAutomation "It drives internet explorer using its DOM properties and methods."