51Testing软件测试论坛

标题: win_activate与set_window的区别? [打印本页]

作者: tianyu124    时间: 2006-4-19 17:30
标题: win_activate与set_window的区别?
win_activate和set_window都是用于激活窗口,但是我在编代码时遇到一个问题:
win_activate ("Login");
set_window ("Login", 10);
edit_set ("Agent Name", "SuperAgent");
当去掉
set_window ("Login", 10);
后wr将不能识别"Agent Name"对象,加上这一句后就恢复正常。
小生求教!
作者: bluecloud    时间: 2006-4-19 18:02
The win_activate function makes the specified window the active window by bringing it into focus and raising it to the top of the display (equivalent to clicking on the window banner). All subsequent input is submitted to this window.

The set_window function directs input to the correct application window. This directs the GUI map to this window.
就我理解
set_window会调整GUI MAP中当前接口
而window_active只是做一个把窗口激活的动作
作者: tianyu124    时间: 2006-4-20 08:32
明白了,多谢!!!
作者: 生如火花    时间: 2006-4-20 09:25
set_window带有同步的效果,即等待这个窗口出现多少秒。
作者: tianyu124    时间: 2006-4-21 11:52
多谢!
作者: lzq123335    时间: 2007-1-25 12:34
发现不用win_activate()也没事啊。我从来都没用,都没发生过问题




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2