Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Ray Franklin
RE: Unable to mark checkboxes with Celerity [ reply ]  
2011-03-27 21:06
Thank you for the pre-release gem. I was able to demonstrate that both the 0.8.8 and 0.8.9.pre gems work quite well with many web sites. I now strongly suspect the complex and highly obfuscated JS in the web service. At this point I do not think it is worth the time to reverse engineer that code. I will just make do with Firefox and use Celerity on better-behaved web sites.

By: Jari Bakken
RE: Unable to mark checkboxes with Celerity [ reply ]  
2011-03-27 00:32
> 1. Am I on the right forum?

More people will see it if you use the celerity-users list:

http://rubyforge.org/mailman/listinfo/celerity-users

> 2. Where IS this problem - my automation code, Celerity, JRuby, web service JS?

That is hard to say. The ScriptException is being thrown inside HtmlUnit (which Celerity wraps). Unless you provide a minimal testcase consisting of the Ruby + HTML/CSS/JS to reproduce the problem, it's hard to give any further advice.

> 3. Has it already been fixed?
> 4. If so, what code and version do I need?

Not that I'm aware of. I've updated the HtmlUnit snapshot and pushed a prerelease gem (0.8.9.pre) which you can get by running `jruby -S gem install celerity --pre`. Please let me know if that helps.

By: Ray Franklin
Unable to mark checkboxes with Celerity [ reply ]  
2011-03-26 23:23
I am using JRuby and Celerity to automate a 3rd party web service I have installed on my own server. I developed the automation code using Watir, Firewatir and Firefox. With Firefox, the code works perfectly. With JRuby/Celerity, it fails on one specific task. The task is checking multiple checkboxes, one at a time by value. The 3rd party package uses Javascript in some obscure way to tick the boxes. To repeat - it works on Firefox, fails on Celerity.

My automation code that fails:
@browser.checkbox(:value, blogid).set(set_or_clear=true)

When I enable JS exceptions using @browser.javascript_exceptions = true, I get the following exception on each page load:

NativeException: com.gargoylesoftware.htmlunit.ScriptException:
Exception invoking jsxFunction_getComputedStyle
goto at
c:/jruby-1.6.0/lib/ruby/gems/1.8/gems/celerity-0.8.8/lib/celerity/browser.rb:100
rescue_status_code_exception at
c:/jruby-1.6.0/lib/ruby/gems/1.8/gems/celerity-0.8.8/lib/celerity/container.rb:796

goto at
c:/jruby-1.6.0/lib/ruby/gems/1.8/gems/celerity-0.8.8/lib/celerity/browser.rb:99

(root) at ConfirmCheck.rb:29

JRuby 1.6.0
Celerity 0.8.8

This makes me suspect something in JRuby or Celerity.

My questions:
1. Am I on the right forum?
2. Where IS this problem - my automation code, Celerity, JRuby, web service JS?
3. Has it already been fixed?
4. If so, what code and version do I need?

Thanks for any insights you can offer.