对于相同的屏幕分辨率和 DPI 设置,IDE 控件的像素可以在两个操作系统之间变化吗?
假设在运行 Windows XP、Windows Vista 和 Windows7 的三台计算机上打开 GUI 应用程序。在所有三台机器中,屏幕分辨率和 DPI 设置都设置为相同的值。应用程序在屏幕上的显示方式在使用的像素数量及其在屏幕上的位置方面是否会有所不同?
提出这个问题的原因是: 我正在使用基于位置的录制和播放方法进行 GUI 自动化。控件位置的任何变化都会影响 GUI 录制的播放。我想确保在 Windowx XP 平台上捕获的录音可以在 Vista 和 Windows7 平台上运行。
Assume a GUI application is opened on three machines running Windows XP, Windows Vista and Windows7. In all the three machines, the screen resolution and the DPI settings are set to be the same value. Will there be a difference in the way the application is displayed on the screen in terms of number of pixels used and their position on the screen?
The reason for asking this question is:
I am using position based record-and-play method for GUI automation. Any change in the position of a control can impact the playback of the GUI recording. I want to be sure that a recording captured on Windowx XP platform works on Vista and Windows7 platforms.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的。操作系统镶边(从窗口边框和标题开始)具有不同的样式(例如,Vista 和 Win7 可能会打开 Aero,因此标题是半透明的)。
这是在考虑应用程序中任何依赖于操作系统的代码之前的情况。
Yes. The OS chrome (starting with window borders and titles) have different styles (e.g. Vista and Win7 will likely have Aero on and thus translucent title).
And that's before considering any OS dependent code in the application.
菜单栏的大小可能不同,因此您可能需要在所有三台机器上单独录制。
The menu bars will probably all be different sizes, so you'll probably need to record separately on all three machines.
请记住,每个用户都可以打开/关闭任意数量的辅助功能设置、任何 DPI 设置,并且按钮大小和窗口边框大小等功能在每个操作系统上都不同......
这里没有人可以保证你会没事的——唯一的方法就是测试。
旁注:一定有比基于位置的播放更好的方法吗?我以前使用过可以读取屏幕文本并以此为基础的自动导航的工具,这似乎更明智,但仍然存在严重缺陷。
Bearing in mind, that each user could have any number of accessibility settings on/off, any DPI setting, and also that features such as button sizes and window border sizes are different on each of these OS's...
No one here could possibly guarantee you'll be fine - the only way is to test.
A side note: there MUST be a better way than position based playback? I've used tools previously that can read screen text and base the automated navigation on that, which seems far more sensible, but still horribly flawed.