Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

elements_by_xpath seem not to be working since upgrading to 0.1.7 from 0.1.5 #3

Open
michaelglass opened this issue Jun 22, 2009 · 3 comments

Comments

@michaelglass
Copy link

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?

@langalex
Copy link
Owner

can you write a spec for this?

@langalex
Copy link
Owner

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.

@brentd
Copy link

brentd commented Aug 26, 2009

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants