smparkes / capybara-envjs

Capybara driver for envjs gem
http://github.com/smparkes/capybara-envjs
130 stars 10 forks source link

Got exception raised when encounter table with `<tfoot>` #6

Closed sikachu closed 14 years ago

sikachu commented 14 years ago

Hello,

The capybara-envjs is working for me so far, but somehow I just ran up into some issue.

Somehow if the page has <table> tag with <tfoot> element in it, Envjs would throw the exception on parsing the page. Some of the backtrace is:

oopsz com.google.gwt.core.client.JavaScriptException: (TypeError): child.tagName is undefined
 fileName: /Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js
 lineNumber: 7382
 stack: ([object Object])@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:7382
$appendCharacters([object Object],[object Object],"\n    ")@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:13318
$flushCharacters([object Object])@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:11615
$appendToCurrentNodeAndPushElement([object Object],"http://www.w3.org/1999/xhtml",[object Object],[object Object])@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:10222
$startTag([object Object],[object Object],[object Object],false)@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:12072
$emitCurrentTagToken([object Object],false,6288)@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:15258
$stateLoop([object Object],6,62,6288,[object Array],false,2,6656)@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:15815
$tokenizeBuffer([object Object],[object Object])@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:17889
$pump([object Object],[object split_global])@/Users/sikachu/.rvm/gems/ruby-1.8.7-p249/gems/envjs-0.3.4/lib/envjs/static.js:13711

The test did completed successfully, but the backtrace would print out the whole HTML document. I just want to know if there's something I can do to track down this bug.

Also, could you tell me the way to compile the static.js from envjs repository? I'd like to update the sources to make sure that it's actually envjs bug.

Thank you

smparkes commented 14 years ago

rake johnson:compile will recreate static.js.

Can you attach the HTML that's causing the problem? That'll make it easier to track down.

smparkes commented 14 years ago

This should be fixed in envjs 0.3.5 (which I should cut shortly).

sikachu commented 14 years ago

Thank you very much. Sorry that I forgot to provide a feedback on your request.

smparkes commented 14 years ago

No worries.