In automated testing, synchronization wait 涔熸槸 a very important issue, especially Ajax, there is, make the problems more complicated. Did the Du Zi Donghua Ceshi clear, Yao right premise of the test object is Duixiang Caozuo even have Cunzai It can be seen Otherwise, it may be wrong, even the script does not run down. This is the automated test script execution error in one of the more common. are summed up under the QTP to wait several synchronization methods.
1> object's default wait time. Run QTP script process to carry out operations on an object, QTP object repository based on the properties of objects or object attributes described in search of this object, if not for some time The corresponding object is found that these objects do not exist. and this time is the object's default wait time. can File -> Settings -> Run -> Object synchronization is set, the default time is 20 seconds.
2> Object Exist property. Exist attributes of each object will have to determine the existence of these objects, which can set a parameter that is the waiting time targets at this time to search. Use Note 1: This is a method of object properties rather than object , its will have a return value, of course, is a Boolean value. it can not be "Browser (" Baidu about, you know "). Page (" Baidu about, you know "). WebEdit (" ; wd "). Exist (5)" as a statement, must accept its return value, or be prompted to lead the object does not support this method. Use Note 2: The parameter is the second rather than the QTP tutorial on the tips of milliseconds, do not was Huyou the.
3> object waitProperty ("property", "expectVaue", timeout) method. Almost every object has this method, this method is the timeout time to wait in an attribute value of this object expectations. If occur within the expected timeout property, immediately to the next step or wait for the timeout. Note that this is the way QTP set synchronization points: the recording mode, select Insert -> Synchronization Point, select the object you want to synchronize, set an attribute to be synchronized A synchronization point can be set up.
4> Synce method. This is the WEB in specific, mainly for the page loaded. To use a smaller range, but simple and practical.
5> wait method, the image is also dubbed the "death and other Dafa." That is, when the Executive to suspend the script step, and then wait for a period of time, the time expires to continue to the next step. Wati (timeout), this method The only parameter is the waiting time of course, it is formed by the second with millisecond.
In broad terms there are five kinds of synchronization waiting QTP method, practical application of which depends on the circumstances, my proposal is in accordance with the above order ...
Failure from shutdown trouble
Describe the C # call an external process
Storage Inventory And Barcoding
Mft Corruption And Partition Loss Due To Extensive
MOV to FLV
FLV to MOV
TS Converter
SAP China's new president, Xiaojie Yun: first priority is to stabilize the team
VBScript ReDim Statement
First job out of the ivory tower beginning how the election
brief Mathematics Education
Simple Site Administration
College Student Hidden Hard To Guarantee The Right To Life And Health Worries
No comments:
Post a Comment