net.ruippeixotog.scalascraper.browser
Closes the InputStream after reading
Closes the InputStream after reading
A Browser implementation based on HtmlUnit, a GUI-less browser for Java programs.
HtmlUnitBrowsersimulates thoroughly a web browser, executing JavaScript code in the pages besides parsing and modelling its HTML content. It supports several compatibility modes, allowing it to emulate browsers such as Internet Explorer.Both the Document and the Element instances obtained from
HtmlUnitBrowsercan be mutated in the background. JavaScript code can at any time change attributes and the content of elements, reflected both in queries toDocumentand on previously stored references toElements. TheDocumentinstance will always represent the current page in the browser's "window". This means theDocument'slocationvalue can change, together with its root element, in the event of client-side page refreshes or redirections. However,Elementinstances belong to a fixed DOM tree and they stop being meaningful as soon as they are removed from the DOM or a client-side page reload occurs.