Imagine the following: You make a get request to a page and you receive its HTML as a response, same as a browser.
Without rendering it, how could you take that HTML string and figure out the x,y width and height properties of an element in the page programmatically?
Could I simulate rendering with some library in a hidden window, or can I simulate a window in js, simulate its rendering and use the normal methods to find these values?