I am still not able to locate the cause of error. Lets make sure that these things are in place:
1. You should have new 'elements.rb' & 'functions.rb' copied from tar ball to [ruby installation directory]/lib/ruby/1.8/rexml. This is the correct folder where you should have elements.rb & functions.rb.
2. You have latest version of watir installed using install.rb not by using watir_installer.exe
Let me know if you still face any problem.
Regards,
Angrez
On 3/9/06, Brown, Christopher <
[EMAIL PROTECTED]> wrote:
Hi Angrez,I haven't been able to spend time on this recently. As you can see from the details below my setup should be okayC:\>ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM'
ruby 1.8.2 (2004-12-25) [i386-mswin32]
"3.1.2.1"
"i386-mswin32"Given the following errorc:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': undefined method `elements' for nil:NilClass (NoMethodError)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in `element_by_xpath'
from G:/workspace/web_pages/trial.rb:3This is what's in watir.rb at line 1922def elements_by_xpath(xpath)
doc = rexml_document_object()
modifiedXpath = ""
selectedElements = Array.new=> doc.elements.each(xpath) do |element| <= line 1922
modifiedXpath = element.xpath
temp = element_by_absolute_xpath(modifiedXpath)
selectedElements << temp if temp != nil
endelement.rb seems to be the missing link. I've tried this file in several locationsC:\ruby\lib\ruby\1.8\rexmlC:\ruby\lib\ruby\1.8\watir\rexmlC:\ruby\lib\ruby\site_ruby\1.8\rexmlC:\ruby\lib\ruby\site_ruby\1.8\watir\rexmlI've read the code and see where rexml/document gets loaded. If create_rexml_document_object does its thing then how can the elements be missing?Any ideas?RegardsChrisp.s.I've just tried v 1.8.4 of Ruby and get the followingc:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1755: [BUG] Segmentation fault
ruby 1.8.4 (2005-12-24) [i386-mswin32]
abnormal program termination-----Original Message-----
From: Angrez Singh [mailto:[EMAIL PROTECTED]]Sent: Friday, March 03, 2006 4:30 PM
To: [email protected]
Subject: Re: [Wtr-general] xpath support doesn't work for meHi Chris,What version of Ruby are you running?
I am using Ruby 1.8.2 and latest watir tar ball. Also REXML version is "3.1.2.1". You can check this by using following command:
ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM'
But still I have no clue of what is going wrong?
Regards,
Angrez
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
