51Testing软件测试论坛

标题: 还是时间问题 [打印本页]

作者: crimson    时间: 2006-11-2 11:45
标题: 还是时间问题
用QTP来自动安装,因为安装过程中的某些步骤可能相隔时间比较长,这种情况下QTP就会因为找不到控件而需要人手动retry。如果我一个个手动设定wait时间,不但麻烦而且难于掌握和移植。请问有什么办法能够设定让QTP retry,最好还能设定retry的间隔和次数。
作者: xiaonan    时间: 2006-11-2 12:37
用QTP的同步点功能,详情你查历史帖子和帮助
作者: yangkinki    时间: 2006-11-2 14:12
用QTP的同步点功能,时间设置在 test - test settings 的run页
作者: crimson    时间: 2006-11-2 15:02
谢谢现在可以用了。但是还是有2个问题。
1.比如说控件"next",在上面一个某个动作没完成的时候,"next"可见,但是是灰色的,也就是说此时click会失败。只有"next"变黑才可以click进行下一个动作。我在加入同步点的时候,不知道该用什么属性判断这种情况。我试了enabled,focused,visible都没办法判断出来next是否可用。请问该用什么属性?winbutton.
2.run设定的最大值好像不能超过1000000毫秒,只有十几分钟,还有办法更大吗?

[ 本帖最后由 crimson 于 2006-11-2 15:05 编辑 ]
作者: xiaonan    时间: 2006-11-2 15:35
那你看看上面这个动作可以用什么办法来判断是否完成啊?

如果时间肯定比较大,那就先加点wait时间,再用同步点
作者: crimson    时间: 2006-11-2 17:38
我没找到可以用来判断的属性,我试了enabled,focused,visible, 都不能准确判断。在winbutton里面也没有其他什么属性可供判断了,下面是winbutton的所有属性,哪一个才能判断next is available?

WinButton Identification Properties
Object identification properties can be used in the object repository description, in programmatic descriptions, in checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

The WinButton test object supports the identification properties listed in the table below.

Property Name
Description

abs_x  The object's absolute x-coordinate (left) relative to the screen (in pixels).  
abs_y  The object's absolute y-coordinate (top) relative to the screen (in pixels).  
attached text  The static text that is attached to a control.  
enabled  Indicates whether the object is enabled.
Possible values:        
       True
       False  
focused  Indicates whether the object has the focus.
Possible values:        
       True
       False  
height  The object's height (in pixels).  
hWnd  The handle of the run-time object's window.  
index  The ordinal identifier that QuickTest assigns to the object to indicate the order in which the object appears in the code relative to other objects with an otherwise identical description. This property cannot be used with GetROProperty.
Values begin with 0.  
location  The ordinal identifier that QuickTest assigns to the object to indicate where the object appears within the window, frame, or dialog box. Values are assigned from top to bottom, and left to right. This property cannot be used with GetROProperty.
Values begin with 0.  
NativeClass  The object's window class name.  
RegExpWndClass  The permanent part of the MFC window class.  
RegExpWndTitle  The constant part of the window title.  
RightAligned  Indicates whether the object has generic "right-aligned" properties.  
RightToLeftLayout  Indicates whether the object's horizontal origin is on the right edge.  
RightToLeftReading  Indicates whether the object's text is displayed using right-to-left reading-order properties.  
text  The text associated with the object.  
visible  Indicates whether the object is visible.
Possible values:        
       True
       False  
width  The object's width (in pixels).  
window id  The object's window identifier.  
WindowExtendedStyle  The extended window style of the object.  
WindowStyle  The window style of the object.  
x  The object's x-coordinate (left) relative to the parent window (in pixels).  
y  The object's y-coordinate (top) relative to the parent window (in pixels).
作者: xiaonan    时间: 2006-11-2 17:49
你看帮助里的这个控件的属性干吗?用object spy来看实际这个控件,找合适的方式判断
作者: 天天晒田阳    时间: 2009-6-12 18:06
你看帮助里的这个控件的属性干吗?




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