Hi, Jason, Thank you very much, it works. But really complex. Thanks. Wesley Chen.
2009/6/8 Jonny Xu <[email protected]> > Hi Wesley, > > > > Hope this is what you want. > > > http://www.rhinocerus.net/forum/lang-ruby/562943-html-method-watir-dont-return-real-html.html > > > > > > Best Regards, > > Jonny > > > > *From:* [email protected] [mailto: > [email protected]] *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 [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
