# How watir reads the page source

**URL:** <https://www.ruby-forum.com/t/how-watir-reads-the-page-source/183724>\
**Category:** Ruby\
**Created:** [February 19, 2010, 6:43am UTC](https://www.ruby-forum.com/t/how-watir-reads-the-page-source/183724 "2010-02-19T06:43:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [February 19, 2010, 6:43am UTC](https://www.ruby-forum.com/t/how-watir-reads-the-page-source/183724/1 "2010-02-19T06:43:35Z")

</div>

Hi,

Currently i am using ie.html and ie.text to get the page source and then  
using this i can actaully clicking on the objects etc.

JHowvere there are some changes done recently and now im not able to see  
page source. It is like frame wise.

When talked with developer, it is replied like now page source is frame  
wise.

Earlier i use this command to get page source –

â€œjavascript:’’ + window.document.body.outerHTML+ ''â€

But now it is –

â€œjavascript:’’%20+%20document.getElementById(“flatViewFrame”).contentWindow.document.body.outerHTML+%20’'â€

â€œjavascript:’’%20+%20document.getElementById(“tableViewFrame”).contentWindow.document.body.outerHTML+%20’'â€

So i dont know what Watir uses bydefault?

I there any way i can change it in Watir so that i can get the source.

If i fire my script it is failing.

Bhavesh
