Question

This is related to (How to get HTML element coordinates using C#?)

The answer given here is quite good. However, opening up a full instance of Internet Explorer seems like overkill if you're trying to process a good deal of information from within your own spider.

Has anyone found/encountered/thought of a way to to do this using the underlying interface structures of IE (Like IHTMLDocument2 and it's brethren).

Thanks in advance.

Was it helpful?

Solution

Most browsers don't agree on per-pixel rendering in every situation. CSS Compliance, rounded corners, transparency support and padding bugs (I'm looking at you, IE6) are just a few.

The only way to reliably do this is to open a browser like the question you linked and figure it out that way. Even then, know that your results may not be the same as another browser will see it.

Site note: Different DPI & zoom settings for accessibility also will affect this, there are tons of variables in what people see. Mac font rendering also differs, so those users will usually see things slightly different as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top