From dorikick at gmail.com Wed Aug 4 01:34:43 2010 From: dorikick at gmail.com (doridori Jo) Date: Tue, 3 Aug 2010 22:34:43 -0700 Subject: [Celerity-users] how to save image file on a page ? Message-ID: if there's an embeded image on the page, , how would I go about downloading it ? img.download ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Wed Aug 4 04:34:04 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Wed, 4 Aug 2010 10:34:04 +0200 Subject: [Celerity-users] how to save image file on a page ? In-Reply-To: References: Message-ID: On Wed, Aug 4, 2010 at 7:34 AM, doridori Jo wrote: > if there's an embeded image on the page, , > how would I go about downloading it ? > > img.download ? > http://rdoc.info/rdoc/jarib/celerity/blob/1c22cc7352384ef975e4923373d4c352bf320c6d/Celerity/Image.html#save-instance_method From dorikick at gmail.com Wed Aug 4 14:21:45 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 11:21:45 -0700 Subject: [Celerity-users] compiling to jar ? Message-ID: is it possible to compile my celerity script to a jar file which can be run anywhere ? http://wiki.github.com/jarib/celerity/creating-jar-files is that the appropriate section ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Wed Aug 4 14:42:49 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Wed, 4 Aug 2010 20:42:49 +0200 Subject: [Celerity-users] compiling to jar ? In-Reply-To: References: Message-ID: On Wed, Aug 4, 2010 at 8:21 PM, doridori Jo wrote: > is it possible to compile my celerity script to a jar file which can be run > anywhere ? Shouldn't be a problem, but you'll need to package JRuby into the jar as well. You should ask the JRuby folks how to do this. The procedure would be the same for Celerity as for other gems, with the one exception that Celerity itself includes some jar files, which you'll need to unpack as well. > > http://wiki.github.com/jarib/celerity/creating-jar-files > > is that the appropriate section ? > Not really - that shows you how to compile and build a jar file of Celerity itself (which can then be required from JRuby). From dorikick at gmail.com Wed Aug 4 14:47:11 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 11:47:11 -0700 Subject: [Celerity-users] windows management (annoying popups) Message-ID: several months ago I pointed this http://github.com/jarib/celerity/issues#issue/17 Any one have any suggestions on how to deal with this ? or has there been any updates on manging windows via celerity ? It would be great if all popup windows could be disabled without the need for disabling javascript support.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Wed Aug 4 15:55:30 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Wed, 4 Aug 2010 21:55:30 +0200 Subject: [Celerity-users] windows management (annoying popups) In-Reply-To: References: Message-ID: On Wed, Aug 4, 2010 at 8:47 PM, doridori Jo wrote: > > Any one have any suggestions on how to deal with this ? or has there been > any updates on manging windows via celerity ? It would be great if all popup > windows could be disabled without the need for disabling javascript > support.... > I think HtmlUnit has APIs that lets you deal with multiple windows, but I've never looked into it. I personally have no need for this feature (and have other things on my plate that takes priority), but if you (or anyone) want to look into it, I'll be happy to merge any patches. From dorikick at gmail.com Wed Aug 4 16:33:33 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 13:33:33 -0700 Subject: [Celerity-users] wrapper for "font" element ? Message-ID: is there any way to locate "font" elements ? HtmlFont from HtmlUnit I've tried browser.font(:text, "some text") but it doesn't work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Wed Aug 4 16:47:30 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Wed, 4 Aug 2010 22:47:30 +0200 Subject: [Celerity-users] wrapper for "font" element ? In-Reply-To: References: Message-ID: On Wed, Aug 4, 2010 at 10:33 PM, doridori Jo wrote: > is there any way to locate "font" elements ? HtmlFont from HtmlUnit > > I've tried > > browser.font(:text, "some text") > > but it doesn't work. > There's no class representing font elements, but you should be able to interact with them using Browser#element_by_xpath: browser.element_by_xpath("//font[text()='some text']") From dorikick at gmail.com Wed Aug 4 16:59:40 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 13:59:40 -0700 Subject: [Celerity-users] wrapper for "font" element ? In-Reply-To: References: Message-ID: could you use element_by_idents ? what's an example to use that method ? what are idents exactly ? example for find_by_condition ? On Wed, Aug 4, 2010 at 1:47 PM, Jari Bakken wrote: > On Wed, Aug 4, 2010 at 10:33 PM, doridori Jo wrote: > > is there any way to locate "font" elements ? HtmlFont from HtmlUnit > > > > I've tried > > > > browser.font(:text, "some text") > > > > but it doesn't work. > > > > There's no class representing font elements, but you should be able to > interact with them using Browser#element_by_xpath: > > browser.element_by_xpath("//font[text()='some text']") > _______________________________________________ > Celerity-users mailing list > Celerity-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/celerity-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Wed Aug 4 17:05:47 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Wed, 4 Aug 2010 23:05:47 +0200 Subject: [Celerity-users] wrapper for "font" element ? In-Reply-To: References: Message-ID: On Wed, Aug 4, 2010 at 10:59 PM, doridori Jo wrote: > could you use element_by_idents ? > > what's an example to use that method ? what are idents exactly ? > > example for find_by_condition ? > These methods are not part of Celerity's public interface - they're used internally to locate elements. Do you have a use case where Browser#element_by_xpath isn't enough? Or do you want to create a patch that implements the Font element? From dorikick at gmail.com Wed Aug 4 17:23:32 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 14:23:32 -0700 Subject: [Celerity-users] wrapper for "font" element ? In-Reply-To: References: Message-ID: well there's some problems with locating /font via xpath. It seems like with badly formed html where is not closed, it returns the rest of the page.... anyways, I found a better solution however not locating /font . On Wed, Aug 4, 2010 at 2:05 PM, Jari Bakken wrote: > On Wed, Aug 4, 2010 at 10:59 PM, doridori Jo wrote: > > could you use element_by_idents ? > > > > what's an example to use that method ? what are idents exactly ? > > > > example for find_by_condition ? > > > > These methods are not part of Celerity's public interface - they're > used internally to locate elements. Do you have a use case where > Browser#element_by_xpath isn't enough? Or do you want to create a > patch that implements the Font element? > _______________________________________________ > Celerity-users mailing list > Celerity-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/celerity-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dorikick at gmail.com Wed Aug 4 18:19:03 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 15:19:03 -0700 Subject: [Celerity-users] wrong number of arguments Message-ID: While running, productpage.tds({:class => 'yst-order', :align => 'left'}) I've also tried productpage.tds(:class, "yst-order") For both I get `cells': wrong # of arguments(2 for 0) (ArgumentError) and (1 for 0) respectively. How to resolve this ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Wed Aug 4 18:32:17 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Thu, 5 Aug 2010 00:32:17 +0200 Subject: [Celerity-users] wrong number of arguments In-Reply-To: References: Message-ID: On Thu, Aug 5, 2010 at 12:19 AM, doridori Jo wrote: > While running, > > productpage.tds({:class => 'yst-order', :align => 'left'}) > > I've also tried > > productpage.tds(:class, "yst-order") > > > For both I get > ?`cells': wrong # of arguments(2 for 0) (ArgumentError) > > and (1 for 0) respectively. > > How to resolve this ? > This isn't supported, which should be easy to discover by reading the docs [1]. The plural methods (e.g. Browser#tds) returns element collections that can be filtered using the normal Ruby Enumerable methods [2]. [1] http://rdoc.info/projects/jarib/celerity [2] http://ruby-doc.org/core/classes/Enumerable.html From dorikick at gmail.com Wed Aug 4 18:36:06 2010 From: dorikick at gmail.com (doridori Jo) Date: Wed, 4 Aug 2010 15:36:06 -0700 Subject: [Celerity-users] wrong number of arguments In-Reply-To: References: Message-ID: yeah, I just using element_by_xpath again. On Wed, Aug 4, 2010 at 3:32 PM, Jari Bakken wrote: > On Thu, Aug 5, 2010 at 12:19 AM, doridori Jo wrote: > > While running, > > > > productpage.tds({:class => 'yst-order', :align => 'left'}) > > > > I've also tried > > > > productpage.tds(:class, "yst-order") > > > > > > For both I get > > `cells': wrong # of arguments(2 for 0) (ArgumentError) > > > > and (1 for 0) respectively. > > > > How to resolve this ? > > > > This isn't supported, which should be easy to discover by reading the > docs [1]. The plural methods (e.g. Browser#tds) returns element > collections that can be filtered using the normal Ruby Enumerable > methods [2]. > > [1] http://rdoc.info/projects/jarib/celerity > [2] http://ruby-doc.org/core/classes/Enumerable.html > _______________________________________________ > Celerity-users mailing list > Celerity-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/celerity-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dorikick at gmail.com Fri Aug 6 01:43:01 2010 From: dorikick at gmail.com (doridori Jo) Date: Thu, 5 Aug 2010 22:43:01 -0700 Subject: [Celerity-users] how to deal with ajaxy sites where browser url doesn't reflect current page location ? Message-ID: Hi, It's frustrating with ajaxy sites where browser.back totally fails. For example, when you go to a certain site, you click on a bunch of links that loads ajax pages or even via javascript. It shows url that is not reflective of the current window's state. For instance browser.url shows http://www.somesite.com/products but when you type this in your browser, it will take you to the default products page, not the specific product listings. However, with ajaxy sites, the specific product listing page shows after you click the right buttons and links. my question is, if one was to crawl all the links and buttons, is there a failsafe way to navigate between pages ? For my case, I was relying on click_and_attach, and closing it when the test on that page is finished. However, this is problematic for ajaxy sites where ad popups show up. After thinking about using the htmlunit api, I feel that maybe click_and_attach should be restricted to popup pages. This also raises the question of whether opening popup pages on ajaxy sites where popup ads also appear. Window management would be crucial. this might sound very vague, but essentially what I'm asking is, is there a failsafe method to programmatically navigate freely forward and backwards between pages on AJAXy (ajax heavy) sites ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at hexagile.com Sat Aug 7 03:41:20 2010 From: peter at hexagile.com (Peter Szinek) Date: Sat, 7 Aug 2010 09:41:20 +0200 Subject: [Celerity-users] frames Message-ID: Hi all, Is it possible to search inside a frame/iframe once the page is loaded - or is it needed to load the URL and search in that document? On a slightly related note, is there a method / simple way to resolve a relative URL in celerity? Cheers, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From akaufm at gmx.de Tue Aug 31 09:49:28 2010 From: akaufm at gmx.de (Anton Kaufmann) Date: Tue, 31 Aug 2010 15:49:28 +0200 Subject: [Celerity-users] lots of timeouts with 0.7.9 / celerity <= 0.0.7 appears more stable Message-ID: <20100831134928.58500@gmx.net> Dear celerity users, we use celerity and nagios as a simple end-to-end-monitoring for some web sites. Recently I upgraded celerity from version 0.0.6 to 0.7.9. Only some minor changes were necessary to get the e2e scripts running under the new celerity version. But with 0.7.9 I've got a lot of timeout exceptions, especially during the day at more network traffic. I increased socket timeout and connection manager timeout of the htmlunit webclient but without success. Now I changed back to celerity version 0.0.7 and the e2e-scripts work more robust like before with celerity version 0.0.6. Did anybody have the same experiences ? Is there a new timeout setting in the new version of celerity or htmlunit I have to set ? java/net/SocketInputStream.java:-2:in `socketRead0' java/net/SocketInputStream.java:129:in `read' java/io/BufferedInputStream.java:218:in `fill' java/io/BufferedInputStream.java:237:in `read' org/apache/commons/httpclient/HttpParser.java:78:in `readRawLine' org/apache/commons/httpclient/HttpParser.java:106:in `readLine' org/apache/commons/httpclient/HttpConnection.java:1116:in `readLine' org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java:1413:in `readLine' org/apache/commons/httpclient/HttpMethodBase.java:1973:in `readStatusLine' org/apache/commons/httpclient/HttpMethodBase.java:1735:in `readResponse' org/apache/commons/httpclient/HttpMethodBase.java:1098:in `execute' org/apache/commons/httpclient/HttpMethodDirector.java:398:in `executeWithRetry' org/apache/commons/httpclient/HttpMethodDirector.java:171:in `executeMethod' org/apache/commons/httpclient/HttpClient.java:397:in `executeMethod' org/apache/commons/httpclient/HttpClient.java:346:in `executeMethod' com/gargoylesoftware/htmlunit/HttpWebConnection.java:101:in `getResponse' com/gargoylesoftware/htmlunit/WebClient.java:1407:in `loadWebResponseFromWebConnection' com/gargoylesoftware/htmlunit/WebClient.java:1340:in `loadWebResponse' com/gargoylesoftware/htmlunit/WebClient.java:299:in `getPage' com/gargoylesoftware/htmlunit/WebClient.java:376:in `getPage' /usr/local/jruby/lib/ruby/1.8/date/format.rb:184:in `goto' /usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/celerity-0.7.9/lib/celerity/container.rb:761:in `rescue_status_code_exception' /usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/celerity-0.7.9/lib/celerity/browser.rb:99:in `goto' Thank you Regards Anton -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01