Hi Wesley.

Only browser, window, document and body are defined vars.
There seem to be absolutly not methods that can be applied to the head
tag of a document (at least in firewatir).

Maybe a work around for you would be to send the html to the hpricot
parser and use that to parse out stuff you need in the document head.

Jason




On 8 Jun., 10:50, Wesley Chen <cjq....@gmail.com> wrote:
> Hi, Jason,
> Thank you very much, it works. But really complex.
> Thanks.
> Wesley Chen.
>
> 2009/6/8 Jonny Xu <jonn...@hotmail.com>
>
> >  Hi Wesley,
>
> > Hope this is what you want.
>
> >http://www.rhinocerus.net/forum/lang-ruby/562943-html-method-watir-do...
>
> > Best Regards,
>
> > Jonny
>
> > *From:* watir-general@googlegroups.com [mailto:
> > watir-gene...@googlegroups.com] *On Behalf Of *Wesley Chen
> > *Sent:* 2009年6月8日 14:36
> > *To:* Watir General
> > *Subject:* [wtr-general] How to get info by Watir script from page source?
>
> > Hi, Guys,
> > I turn to one of the page in my system, view the page source, it displays:
> > *<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> >http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > <!-- server01 -->
> > <html xmlns="http://www.w3.org/1999/xhtml";
> > xmlns:v="urn:schemas-microsoft-com:vml">
> > <head>
> >     <title>active</title>
> > </head>
> > <body>
> > </body>
> > </html>*
>
> > If I use *ie.html*, I can only get the code between <html>***</html>
> > I can use ie.document.body.innerHtml to get the code between
> > <body>***</body>
>
> > 1. If I would like to get only the code between <head>***</head>, how can I
> > make it?
> > 2. If I would like to get the *<!-- server01 --> *, how can I make it? how
> > can I get *<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> >http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>?*
>
> > Any suggestion would be quite appreciated.
>
> > Thanks.
> > Wesley Chen.
--~--~---------~--~----~------------~-------~--~----~
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