azaslavsky / domJSON

Convert DOM trees into compact JSON objects, and vice versa, as fast as possible.
http://azaslavsky.github.io/domJSON/
Other
126 stars 43 forks source link

Getting the complete DOM #21

Closed lolaclinton closed 5 years ago

lolaclinton commented 8 years ago

Hi, I was wondering how I can get the full DOM for a page. I tried putting in the html element or the body element but it crashed on them both. Thanks

lolaclinton commented 8 years ago

I gave it the document.body, from the home page of the mcdonalds.com website which seemed okay, but I got the following error org.openqa.selenium.ElementNotVisibleException: element not visible: Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('email') does not support selection. Does that mean the elements need to be visible to be read? Is there a way around it?

azaslavsky commented 8 years ago

Hmm, I am 90% sure this is the same issue as the one here: https://github.com/azaslavsky/domJSON/issues/18. I'm very slammed at work right now, but I will try and look at this as soon as I have a moment.

ssnet-xyz commented 7 years ago

Hmm, for me it crashes on inputs of type submit and button, visible or not. (Love this tool by the way!)

azaslavsky commented 5 years ago

This issue should be resolved by commit #32