Re: [wtr-general] Re: Parse HTML from database in Watir?

2013-12-02 Thread Lonny Eachus

On Friday, May 17, 2013 10:43:32 AM UTC-7, Željko Filipin wrote:

 On Fri, May 17, 2013 at 7:41 PM, Chuck van der Linden 
 cvande...@climate.com wrote:

 IMHO if you are just trying to parse HTML, and not trying to drive a 
 browser, you might be better off to just use Nokogiri (
 http://rubygems.org/gems/nokogiri) 


 +1

 Željko


While in general that might be the case, my use-case requires Watir, and 
while Watir might not be great at parsing HTML,  using a completely 
separate parser like Nokigiri in ADDITION to Watir is overkill for this 
particular purpose.

Having said that, I would like to add: I must admit that I like the 
flexibility of Selenium-Webdriver, in that it can now drive many different 
browsers, and so on. However, Selenium-Webdriver also has some rather 
severe limitations, some of which were intentionally built in (I know that 
some limitations are by design, from my own conversations with 
Selenium-Webdriver developers.)

While the OLD (pre-FireWatir) Watir was restricted to IE, which was itself 
a severe limitation, if you could live with that it did many things better 
than the new Watir with Selenium-Webdriver does. I know Watir is a testing 
platform but it has many uses beyond testing that over the years have often 
been ignored or actively discouraged.

 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: Parse HTML from database in Watir?

2013-05-17 Thread Chuck van der Linden
On Wednesday, May 15, 2013 7:03:22 PM UTC-7, Lonny Eachus wrote:


 This is a rather urgent issue. 

 I have some whole-page HTML in a database. I would like to get this HTML 
 into Watir for parsing. 

 How can I tell Watir to load this HTML into the DOM? 

 I know I could write the data to a .html file and read it that way, but 
 that would seem to be a rather roundabout way to do it. 

 How does one load HTML from text into Watir? 


 Lonny Eachus 
 === 
   


Watir's specialty is driving browsers.. parsing HTML comes with that 
territory but neither Webdriver nor Watir are really optimized for html 
parsing.

Gems like Nokogiri on the other hand ARE designed for just that sort of 
thing.  IMHO if you are just trying to parse HTML, and not trying to drive 
a browser, you might be better off to just use Nokogiri 
(http://rubygems.org/gems/nokogiri) 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] Re: Parse HTML from database in Watir?

2013-05-17 Thread Željko Filipin
On Fri, May 17, 2013 at 7:41 PM, Chuck van der Linden 
cvanderlin...@climate.com wrote:

 IMHO if you are just trying to parse HTML, and not trying to drive a
 browser, you might be better off to just use Nokogiri (
 http://rubygems.org/gems/nokogiri)


+1

Željko

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Parse HTML from database in Watir?

2013-05-16 Thread Alex Rodionov
For the record, that was replied on IRC:

[09:25am] p0deje: lonny_: you can use data URI
[09:26am] p0deje: browser.goto data:text/html,#{html}
[09:27am] lonny_: Thanks. I'll give that a try.
[09:29am] lonny_: Yes! That worked. Thank you very much.


On Thursday, May 16, 2013 9:03:22 AM UTC+7, Lonny Eachus wrote:


 This is a rather urgent issue. 

 I have some whole-page HTML in a database. I would like to get this HTML 
 into Watir for parsing. 

 How can I tell Watir to load this HTML into the DOM? 

 I know I could write the data to a .html file and read it that way, but 
 that would seem to be a rather roundabout way to do it. 

 How does one load HTML from text into Watir? 


 Lonny Eachus 
 === 





-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.