I have an html element like:
I want to search for this element by id, but it seems that nokogiri is getting confus
Chris, try this and let me know if it works:
doc = Nokogiri::HTML(page)
el = doc.xpath("//div[@id='spam[500]']").first
The problem is that you can't access it via CSS (even in the browser). Try setting some CSS attributes for "spam[500]" and they won't be applied. You can access via xpath however, as shown above.