culerity
culerity copied to clipboard
elements_by_xpath seem not to be working since upgrading to 0.1.7 from 0.1.5
just upgraded to 0.1.7 and most of my tests started breaking. Getting this error:
undefined method `to_xml' for "Culerity::RemoteObjectProxy.new(94, @io)":String (NoMethodError)
coming from this code:
$browser.elements_by_xpath("//table[@class='aeDays']//td")[day].to_xml
like I said: works in celerity. Works in 0.1.5. Any ideas?
can you write a spec for this?
you might also want to look at the commit history, there's not that many changes between 1.5 and 1.7 to find out what the problem is.
Ran into this issue as well.
It was probably "working" in 0.1.5 because there was no special handling of Arrays in CelerityServer#proxify -- now there is, but it's broken. Now we're returning an Array of proxy objects rather than a proxy object which represents an Array. The problem is that the proxy objects are being eval'd on the other side as Strings instead of RemoteProxyObjects.
Wrote a spec for this and implemented a fix which is working for me.
http://gist.github.com/175700