Natasha,

This is where you need to use a little natural Ruby. For example:

filename = 'output.xml'
File.open(filename, 'w').write browser.html

Another useful style is:

File.open(filename, 'w') do |output|
        output.puts "Whatever I want to put in the file."
end

Hope this helps.

Alex

On 18 May 2009, at 18:46, Natasha wrote:

>
> Hello All,
>
> Apologies for an unambiguous subject line.
>
> Following is a scenario in my test:
>
> 1. On a particular page, we have a hyperlink.
> 2. When you click on that hyperlink, it opens up an XML document in
> the same window
> 3. I wanted to copy the contents and save that XML file on disk. I can
> do that manually by clicking on File menu option of the browser and
> selecting Save As option.
>
> Is there a way I can manully save the output of the entire page as an
> XML file?
>
> Thanks,
> Natasha
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to