You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to add this to our massive project to make it work with the Akephalos driver.
I guess this most likely will need to be passed on to some of the gems deeper down.
I would guess htmlunit passes pure html to nokogiri so the htmlunit side of things should be fine I guess.
What really bugs me is that this works fine with the selenium driver.
I think I can provide the raw html for a page that needs this workaround upon request.
This function seem to suffer a lot on pages with massive tables.
# Workaraound for a bug in the Akephalos driver
# Akephalos some times makes:
# <tr>
# <td><..><..><..></td>
# </tr>
# into:
# <tr>
# <td><..></td>
# <..>
# <..>
# </tr>
def self.akephalos_bug_workaround row
ret = row.dup
if row.name == 'tr'
if row.children.size > 0 && row.children[0].respond_to?(:name) && row.children[0].name == 'td'
ret.children = Nokogiri::XML::NodeSet.new(row.document)
row.children.each do |td|
if td.name == 'td'
ret << td.dup
else
ret.children.last << td.dup
end
end
end
end
ret
end
The text was updated successfully, but these errors were encountered:
I had to add this to our massive project to make it work with the Akephalos driver.
I guess this most likely will need to be passed on to some of the gems deeper down.
I would guess htmlunit passes pure html to nokogiri so the htmlunit side of things should be fine I guess.
What really bugs me is that this works fine with the selenium driver.
I think I can provide the raw html for a page that needs this workaround upon request.
This function seem to suffer a lot on pages with massive tables.
The text was updated successfully, but these errors were encountered: