From tomas.pospisek at zhdk.ch Tue Sep 7 03:25:10 2010 From: tomas.pospisek at zhdk.ch (tomas.pospisek at zhdk.ch) Date: Tue, 7 Sep 2010 09:25:10 +0200 Subject: [Celerity-users] lots of timeouts with 0.7.9 / celerity <= 0.0.7 appears more stable In-Reply-To: <20100831134928.58500@gmx.net> References: <20100831134928.58500@gmx.net> Message-ID: <1655E7936826D349AFD86ECB30B8BC7E01A08FB58D@MAILSERVER.vera.hgka.ch> > Anton Kaufmann wrote: [...] > Is there a new timeout setting in the new version of celerity or htmlunit I have to set ? Maybe this could help? : http://rubyforge.org/pipermail/celerity-users/2010-July/000406.html *t From carl at youngbloods.org Tue Sep 7 07:24:35 2010 From: carl at youngbloods.org (Carl Youngblood) Date: Tue, 7 Sep 2010 13:24:35 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing Message-ID: I'm trying to do some blackbox testing on a .NET site that turns every link into a javascript-based submit. Nothing seems to happen when I click on these links with Celerity. For example: require "rubygems" require "celerity" browser = Celerity::Browser.new browser.goto('http://10.47.27.144/tms/default.aspx?pageId=17') text1 = browser.html.dup browser.link(:text, 'Video self view sample test').click text2 = browser.html.dup raise "Clicking didn't work" if text1 == text2 This code raises an exception. The link that I'm trying to click on looks like this: Video self view sample test Let me know if you would like to see more detail. Suffice it to say that this works in a regular browser. Has anyone else had trouble with these kinds of sites in Celerity? Any suggestions? Thanks, Carl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Tue Sep 7 08:26:16 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Tue, 7 Sep 2010 14:26:16 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: On Tue, Sep 7, 2010 at 1:24 PM, Carl Youngblood wrote: > browser.goto('http://10.47.27.144/tms/default.aspx?pageId=17') I will need a publicly accessible site (or static HTML/JS) in order to dig further into this. From carl at youngbloods.org Tue Sep 7 09:41:26 2010 From: carl at youngbloods.org (Carl Youngblood) Date: Tue, 7 Sep 2010 15:41:26 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: Unfortunately this is a Tandberg TMS appliance that is running inside our firewall. I could post the HTML for the page but it refers to a bunch of javascripts also. It would probably be difficult for me to bundle everything up in a way that is testable. Would it maybe help to at least send you the HTML of the page? http://gist.github.com/568347 On Tue, Sep 7, 2010 at 2:26 PM, Jari Bakken wrote: > On Tue, Sep 7, 2010 at 1:24 PM, Carl Youngblood > wrote: > > browser.goto('http://10.47.27.144/tms/default.aspx?pageId=17') > > I will need a publicly accessible site (or static HTML/JS) in order to > dig further into this. > _______________________________________________ > 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 carl at youngbloods.org Thu Sep 9 02:59:15 2010 From: carl at youngbloods.org (Carl Youngblood) Date: Thu, 9 Sep 2010 08:59:15 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: Jari, did this help you at all? On Tue, Sep 7, 2010 at 3:41 PM, Carl Youngblood wrote: > Unfortunately this is a Tandberg TMS appliance that is running inside our > firewall. I could post the HTML for the page but it refers to a bunch of > javascripts also. It would probably be difficult for me to bundle everything > up in a way that is testable. Would it maybe help to at least send you the > HTML of the page? > > http://gist.github.com/568347 > > > On Tue, Sep 7, 2010 at 2:26 PM, Jari Bakken wrote: > >> On Tue, Sep 7, 2010 at 1:24 PM, Carl Youngblood >> wrote: >> > browser.goto('http://10.47.27.144/tms/default.aspx?pageId=17') >> >> I will need a publicly accessible site (or static HTML/JS) in order to >> dig further into this. >> _______________________________________________ >> 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 Thu Sep 9 05:40:40 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Thu, 9 Sep 2010 11:40:40 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: On Thu, Sep 9, 2010 at 8:59 AM, Carl Youngblood wrote: > Jari, did this help you at all? > Not really - I don't see anything obvious that would cause trouble. Again, if you're able to reduce it so I can reproduce the problem, I'd be happy to take a look. You might want to instantiate the browser with these options, to get more output: Celerity::Browser.new(:javascript_exceptions => true, :log_level => :all, :status_code_exceptions => true) From carl at youngbloods.org Fri Sep 10 05:30:26 2010 From: carl at youngbloods.org (Carl Youngblood) Date: Fri, 10 Sep 2010 11:30:26 +0200 Subject: [Celerity-users] Find link by regex Message-ID: Is it possible to find a link based on a regex? I have a link with some whitespace inbetween the anchor tags that seems like it isn't being found because of an imperfect match. From carl at youngbloods.org Fri Sep 10 07:01:39 2010 From: carl at youngbloods.org (Carl Youngblood) Date: Fri, 10 Sep 2010 13:01:39 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: Thanks for the tip Jari. Enabling those options gave me the following stack trace when trying to click those javascript postback links: com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java:601:in `run': com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "callee" from null (http://10.47.27.144/TMS/ScriptResource.axd?d=wuR51tHQkuLENPpQMGO1BKRbjgC7NBjR5DeYknZdMrJ8idPdYUQDMV_CnQNUg0Iov-861HcTD1LJbtqeEYf_E9mGcTcyP26xKUwP9uRm1bw1&t=16ab2387#5) (NativeException) from net/sourceforge/htmlunit/corejs/javascript/Context.java:537:in `call' from net/sourceforge/htmlunit/corejs/javascript/ContextFactory.java:538:in `call' from com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java:499:in `execute' from com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java:474:in `execute' from com/gargoylesoftware/htmlunit/html/HtmlPage.java:880:in `executeJavaScriptIfPossible' from com/gargoylesoftware/htmlunit/html/HtmlAnchor.java:96:in `doClickAction' from com/gargoylesoftware/htmlunit/html/HtmlAnchor.java:124:in `doClickAction' from com/gargoylesoftware/htmlunit/html/HtmlElement.java:1263:in `click' from com/gargoylesoftware/htmlunit/html/HtmlElement.java:1214:in `click' from com/gargoylesoftware/htmlunit/html/HtmlElement.java:1177:in `click' from /Users/carl/.rvm/gems/jruby-1.5.2 at celeritytest/gems/celerity-0.8.1/lib/celerity/element.rb:285:in `click' from /Users/carl/.rvm/gems/jruby-1.5.2 at celeritytest/gems/celerity-0.8.1/lib/celerity/container.rb:794:in `rescue_status_code_exception' from /Users/carl/.rvm/gems/jruby-1.5.2 at celeritytest/gems/celerity-0.8.1/lib/celerity/clickable_element.rb:10:in `click' from test.rb:13 The code it's referring to looks like this (unminified): http://gist.github.com/573445 Looks like it might be referring to line 479 or 482. Have you seen any problems like this before? Thanks, Carl On Thu, Sep 9, 2010 at 11:40 AM, Jari Bakken wrote: > On Thu, Sep 9, 2010 at 8:59 AM, Carl Youngblood wrote: >> Jari, did this help you at all? >> > > Not really - I don't see anything obvious that would cause trouble. > Again, if you're able to reduce it so I can reproduce the problem, I'd > be happy to take a look. > > You might want to instantiate the browser with these options, to get > more output: > > ?Celerity::Browser.new(:javascript_exceptions => true, :log_level => > :all, :status_code_exceptions => true) > _______________________________________________ > Celerity-users mailing list > Celerity-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/celerity-users > From zeljko.filipin at wa-research.ch Fri Sep 10 07:26:10 2010 From: zeljko.filipin at wa-research.ch (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 10 Sep 2010 13:26:10 +0200 Subject: [Celerity-users] Find link by regex In-Reply-To: References: Message-ID: On Fri, Sep 10, 2010 at 11:30 AM, Carl Youngblood wrote: > Is it possible to find a link based on a regex? Not sure if it is implemented in Celerity (but I think it is). Example: browser.link(:text => /regexp/).click ?eljko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Fri Sep 10 07:37:49 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Fri, 10 Sep 2010 13:37:49 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: On Fri, Sep 10, 2010 at 1:01 PM, Carl Youngblood wrote: > > The code it's referring to looks like this (unminified): > > http://gist.github.com/573445 > > Looks like it might be referring to line 479 or 482. Have you seen any > problems like this before? > Yes, unfortunately I have. HtmlUnit's JS engine isn't perfect. You should try to reproduce the problem with a static HTML page and report it to the HtmlUnit tracker (or mailing list). Reducing it can be difficult though - I tried the most obvious thing here, without luck: http://tttt.mine.nu/~jarib/tmp/callee.html. From peter at hexagile.com Sat Sep 11 06:29:14 2010 From: peter at hexagile.com (Peter Szinek) Date: Sat, 11 Sep 2010 12:29:14 +0200 Subject: [Celerity-users] celerity equivalent of click(boolean shiftKey, boolean ctrlKey, boolean altKey) ? Message-ID: Hey guys, Does celerity expose *click *(boolean shiftKey, boolean ctrlKey, boolean altKey)? If not, is it possible to access it somehow (I'd like to select multiple elements from a select list with CTRL+click). Cheers, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Sat Sep 11 07:11:44 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Sat, 11 Sep 2010 13:11:44 +0200 Subject: [Celerity-users] celerity equivalent of click(boolean shiftKey, boolean ctrlKey, boolean altKey) ? In-Reply-To: References: Message-ID: On Sat, Sep 11, 2010 at 12:29 PM, Peter Szinek wrote: > Hey guys, > > Does celerity expose click(boolean?shiftKey, boolean?ctrlKey, > boolean?altKey)? It's not exposed. Patches welcome! > If not, is it possible to access it somehow (I'd like to select multiple > elements from a select list with CTRL+click). > There are several ways to do this: * call SelectList#select several times * call SelectList#select with a regular expression * call Option#click on the options you want selected From carl at youngbloods.org Sat Sep 11 17:42:57 2010 From: carl at youngbloods.org (Carl Youngblood) Date: Sat, 11 Sep 2010 23:42:57 +0200 Subject: [Celerity-users] Clicking on .NET postback links seems to do nothing In-Reply-To: References: Message-ID: Thanks Jari. I'm not sure where to begin but I'll try to create static example to reproduce this bug. On Fri, Sep 10, 2010 at 1:37 PM, Jari Bakken wrote: > On Fri, Sep 10, 2010 at 1:01 PM, Carl Youngblood wrote: >> >> The code it's referring to looks like this (unminified): >> >> http://gist.github.com/573445 >> >> Looks like it might be referring to line 479 or 482. Have you seen any >> problems like this before? >> > > Yes, unfortunately I have. HtmlUnit's JS engine isn't perfect. You > should try to reproduce the problem with a static HTML page and report > it to the HtmlUnit tracker (or mailing list). Reducing it can be > difficult though - I tried the most obvious thing here, without luck: > > ?http://tttt.mine.nu/~jarib/tmp/callee.html. > _______________________________________________ > Celerity-users mailing list > Celerity-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/celerity-users > From mcorner at gmail.com Sun Sep 12 12:16:53 2010 From: mcorner at gmail.com (Mark Corner) Date: Sun, 12 Sep 2010 12:16:53 -0400 Subject: [Celerity-users] Crash? Message-ID: <7680AF35-59DE-4B33-B96E-89C4E57EB2B3@gmail.com> I am a beginning celerity user. I tried a simple login form and I am getting the following error (and warning): RHINO USAGE WARNING: Missed Context.javaToJS() conversion: Rhino runtime detected object public void com.gargoylesoftware.htmlunit.javascript.host.html.HTMLInputElement.jsxSet_checked(boolean) of class net.sourceforge.htmlunit.corejs.javascript.MemberBox where it expected String, Number, Boolean or Scriptable instance. Please check your code for missing Context.javaToJS() call. com/gargoylesoftware/htmlunit/html/HtmlForm.java:110:in `submit': java.lang.NullPointerException: null (NativeException) from com/gargoylesoftware/htmlunit/html/HtmlSubmitInput.java:77:in `doClickAction' from com/gargoylesoftware/htmlunit/html/HtmlElement.java:1263:in `click' from com/gargoylesoftware/htmlunit/html/HtmlElement.java:1214:in `click' from com/gargoylesoftware/htmlunit/html/HtmlElement.java:1177:in `click' from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/celerity-0.8.1/lib/celerity/disabled_element.rb:34:in `click' from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/celerity-0.8.1/lib/celerity/container.rb:794:in `rescue_status_code_exception' from /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/celerity-0.8.1/lib/celerity/clickable_element.rb:10:in `click' from tapjoy.rb:17 What does that mean? Here is the script: require 'rubygems' require 'celerity' browser = Celerity::Browser.new browser.goto('http://www.tapjoy.com') browser.text_field(:name, "ctl00_ContentPlaceHolder1_LoginView1_Login1_Username_text").value = 'myusername' browser.text_field(:name, "ctl00_ContentPlaceHolder1_LoginView1_Login1_Password_text").value = 'mypassword' browser.button(:id, 'ctl00_ContentPlaceHolder1_LoginView1_Login1_LoginButton').click puts browser.text Any ideas? I appreciate the help! -Mark From jari.bakken at gmail.com Mon Sep 13 05:43:40 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Mon, 13 Sep 2010 11:43:40 +0200 Subject: [Celerity-users] Crash? In-Reply-To: <7680AF35-59DE-4B33-B96E-89C4E57EB2B3@gmail.com> References: <7680AF35-59DE-4B33-B96E-89C4E57EB2B3@gmail.com> Message-ID: On Sun, Sep 12, 2010 at 6:16 PM, Mark Corner wrote: > Any ideas? ?I appreciate the help! > Looks like you've found a bug in HtmlUnit - you should submit it to their tracker: http://htmlunit.sourceforge.net/submittingBugs.html I updated Celerity head (http://github.com/jarib/celerity) to the latest 2.9 snapshot of HtmlUnit a moment ago, so you might want to see if that fixes the issue first. From minger at gmail.com Tue Sep 14 09:13:27 2010 From: minger at gmail.com (Ming) Date: Tue, 14 Sep 2010 09:13:27 -0400 Subject: [Celerity-users] things that broke going from 0.7.8 to 0.8.1 Message-ID: I've been running 0.7.8 happily for many months then decided to upgrade to the latest, 0.8.1. Immediately, two things broke. 1) initializing the browser, Celerity::Browser.new(..., :css => false, ...), reported an error. Taking out :css => false makes it work again. 2) browser.goto('http://xyz.com") browser.link(:text, /Some_Word\//).click (also browser.link(:text => /Some_Word\//).click reports /usr/local/jruby/lib/ruby/gems/1.8/gems/celerity-0.8.1/lib/celerity/element.rb:178:in `assert_exists': Unable to locate Link, using :text and /Some_Word\// (Celerity::Exception::UnknownObjectException) I watch the process with QtViewer and it goto the page fine, but it is unable to find the link. When I delete 0.8.1 from the local gems, reverting back to 0.7.8 it works fine again. I checked issues and don't see anything reported like this, open or closed. If this is indeed newly reported, I'll submit an issue with an example I can share. -Ming -------------- next part -------------- An HTML attachment was scrubbed... URL: From jari.bakken at gmail.com Tue Sep 14 09:19:25 2010 From: jari.bakken at gmail.com (Jari Bakken) Date: Tue, 14 Sep 2010 15:19:25 +0200 Subject: [Celerity-users] things that broke going from 0.7.8 to 0.8.1 In-Reply-To: References: Message-ID: On Tue, Sep 14, 2010 at 3:13 PM, Ming wrote: > I checked issues and don't see anything reported like this, open or closed. > ?If this is indeed newly reported, I'll submit an issue with an example I > can share. These are new to me - please submit issues containing the full error messages / reproducible examples.