Every repository with this icon (
Every repository with this icon (
| Description: | watir on steroids / jruby wrapper for htmlunit edit |
-
Is there any way to use celerity wtih proxy that uses authentication.
I just need setup login and password for Celerity::Browser.Comments
-
Clicking link with URL-encoded href fails (double-encoding)
1 comment Created about 1 month ago by kerrybWhen I call
clickon a link which has a URL-encoded href (eg a link to a URL containing spaces encoded as %20), celerity appears to re-encode the URL, so for example "foo%20bar" becomes "foo%2520bar".This was working OK in 0.7.3, but seems to have broken in 0.7.4. I'm not sure whether it's an issue with Celerity itself, or with htmlunit.
The issue can be reproduced with the following code:
require "rubygems" require "celerity" browser = Celerity::Browser.new browser.goto('http://localhost/celerity_test.html') browser.link(:text, 'Another page').click puts browser.text'celerity_test.html' contains the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Celerity Test</title></head> <body> <p> <a href="another%20page.html">Another page</a> </p> </body> </html>'another page.html' just needs to have some content to indicate that it's the right page.
I tried to create a patch (or at least a failing spec), but doing something similar to the above from within a spec seemed to work OK. Maybe it's fixed in master.
Comments
-
Element#== returns false for the same page element
1 comment Created about 1 month ago by ashleymoranThe following code outputs "false"
#!/usr/bin/env jruby require "rubygems" gem "celerity" require "celerity" b = Celerity::Browser.new b.goto("http://www.google.co.uk/") puts b.button(:text => "Google Search") == b.button(:text => "Google Search")This caught us out because we were writing Cucumber step matchers, and the code was failing even though we were actually finding the right element. (We wanted to check that the element with input focus was the first text field in a form.)
Would it be possible to implement Element#== in terms of something with more page semantics, such as the XPath of the elements?
Comments
-
Container#td as alias for Container#cell
1 comment Created about 1 month ago by ashleymoranIt would be useful if you could access table cells via a
Container#tdmethod. Every single time I access table cells I writetdand wonder why it doesn't work.It could display a warning or something if the reason for this is Watir-compatibility.
Comments
-
browser.remove_listener wrong number of arguments error
1 comment Created 2 months ago by drogushttp://github.com/jarib/celerity/blob/master/lib/celerity/browser.rb#L533 - at this line remove_listener is called with block rather than passing it as second argument:
http://github.com/jarib/celerity/blob/master/lib/celerity/listener.rb#L52Comments
-
add_cookie method create HtmlUnit util.Cookie with arguments in the wrong order
1 comment Created 2 months ago by treyhydeSee the latest change in my branch for the fix.
Comments
This seems to have been fixed already:
http://github.com/jarib/celerity/commit/20b63e5c7f24748c75d5ee9647c61b3b7b003c0f
Thanks for contributing anyway! :)
-
SelectList#select_value behaves differently than watir equivalent.
2 comments Created 4 months ago by lastobelusSUMMARY:
Celerity selects only by option label/text; watir can select by valueDESCRIPTION:
In Watir, SelectList has two methods for selecting:
select (selects by text, or label)
select_value (selects by value)in celerity select_value is aliased to select. However, matches_option? checks the passed value only against option labels, not against option values.
EFFECT:
Tests written to select dropdown items by value (very typical in multi-language applications for example) will fail.Comments
-
browser = Celerity::Browser.new :resynchronize => true, :browser => :firefox, :log_level => :off
browser.clear_cookiesbrowser.goto("http://www.monster.de/")
page = browser.page
file = Dir.pwd + "/page.dmp"
File.open(file, 'w') {|f| f.write(Marshal.dump(page)) }=> `marshal_dump': java.lang.ref.WeakReference (IOError)
removing the :resynchronize => true results in the marshal dump working properly.
I guess that this has something to do with threading.Comments
You can't rely on Java objects in JRuby being Marshal#dump-able, especially when they don't implement java.io.Serializable.
This request belongs to either the JRuby list ("why can't I dump WeakReferences") or on the HtmlUnit list ("why aren't pages serializable").
-
HtmlUnit allows you to disable JavaScript with
WebClient.setJavaScriptEnabled(false). The only way to do this in Celerity isbrowser.webclient.java_script_enabled = false.I think this should be a Celerity::Browser constructor option and also a setter (so you can turn it on and off part way through a test).
Comments
ashleymoran
Mon Jul 20 11:46:32 -0700 2009
| link
BTW I should really say please when putting in feature requests. It would be nice if Celerity did this, not write it now goddamit :)
-
setTimeout with a window.location= fails to update browser.text or browser.url
1 comment Created 5 months ago by mrship -
jquery preventDefault fails for forms when browser is set to firefox
1 comment Created 6 months ago by willThe forum should not submit because of either the event.preventDefault() or by returning false. In real safari or firefox, this works ( see http://uiuc.us/jquery.html ), but when the browser on htmlunit is set to firefox, the forum submits and goes to google. When it is set to internet_explorer, it works correctly.
I'm not sure if this is a bug in celerity or htmlunit itself.
Comments












Please use the mailing list for support requests.
You should look at the documentation for Celerity::Browser#initialize (to specify proxy) and Celerity::Browser#credentials= for basic HTTP authentication.
http://celerity.rubyforge.org/yard/Celerity/Browser.html#initialize-instance_method
http://celerity.rubyforge.org/yard/Celerity/Browser.html#credentials%3D-instance_method
Celerity::Browser#credentials= is for basic HTTP authentication, but not for PROXY authentication.
But i have found workaround
Ah, I see.
It would be nice if the user could specify this as part of the proxy option on the constructor, i.e.
Browser.new(:proxy => "login:password@host:port")
If you decide to fork Celerity and implement this, I'd be happy to pull it in. :)