开发者

How to get HTML element coordinates using C#?

开发者 https://www.devze.com 2022-12-18 06:27 出处:网络
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

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 d开发者_StackOverflowo this using the underlying interface structures of IE (Like IHTMLDocument2 and it's brethren).

Thanks in advance.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消