Hi,

Are you using latest version of REXML i.e. 3.1.4 ? If not install latest version of REXML and try XPath again.

Regards,
Angrez

On 6/29/06, NIcky Sandhu <[EMAIL PROTECTED]> wrote:
I got an error using the xpath feature with watir 1.5.1.1045.
>> ie.link(:xpath,'//a[contains(string(.),"Search Now")]').click
 
I have attached the error document and the stack trace below.
The document seems to be valid xml and other xpath tools work fine
REXML::ParseException: #<Iconv::IllegalSequence: <<< see attached error.xml >>
....
c:/ruby/lib/ruby/site_ruby/1.8/rexml/encodings/ICONV.rb:7:in `conv'
c:/ruby/lib/ruby/site_ruby/1.8/rexml/encodings/ICONV.rb:7:in `decode'
c:/ruby/lib/ruby/site_ruby/1.8/rexml/source.rb:50:in `encoding='
c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/baseparser.rb:203:in `pull'
c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:190:in `build'
c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:45:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1887:in `create_rexml_document_object'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1869:in `rexml_document_object'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2071:in `elements_by_xpath'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2064:in `element_by_xpath'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:3466:in `locate'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2256:in `assert_exists'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2396:in `click'
(irb):11:in `irb_binding'
c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
c:/ruby/lib/ruby/1.8/irb/workspace.rb:52
...
"\240 </td></tr><tr "...
Line:
Position:
Last 80 unconsumed characters:
 <HTML> <body  text="#000000" vLink="#707070" link="#076a9c" bgColor="#ffffff" le
 from c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:89:in `parse'
 from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:190:in `build'
 from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:45:in `initialize'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1887:in `create_rexml_document_object'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1869:in `rexml_document_object'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2071:in `elements_by_xpath'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2064:in `element_by_xpath'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:3466:in `locate'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2256:in `assert_exists'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2396:in `click'
 from (irb):11
>>
 
Warning: this e-mail may contain information proprietary to Raley's and is intended only for the use of the intended recipients. If the reader of this message is not an intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately.


_______________________________________________
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

Reply via email to