05-06-2011, 12:05 PM
Try with the following things:
1. Remove coornidates whereever you find in your script. Like i can see the following line your script:
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click 229,33 ' insted of this you should right
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click
2. Provide sync/wait points whenever required
3. Your OR is having redundency of objects. you can try DP like
Dialog("nativeclass:=#32770")
whenever you find dialog box you can replace that with above one.
Winbutton("text:=&Yes")
replace winbutton with the above one
that means Dialog("File Download_3").Dialog("Save As").WinButton("Yes").Click could be written:
dialog("nativeclass:=#32770").dialog("nativeclass:=#32770").Winbutton("text:=&Yes").Click
4. You can use object spy feature of QTP to know the object properties and object hierarchy level.
1. Remove coornidates whereever you find in your script. Like i can see the following line your script:
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click 229,33 ' insted of this you should right
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click
2. Provide sync/wait points whenever required
3. Your OR is having redundency of objects. you can try DP like
Dialog("nativeclass:=#32770")
whenever you find dialog box you can replace that with above one.
Winbutton("text:=&Yes")
replace winbutton with the above one
that means Dialog("File Download_3").Dialog("Save As").WinButton("Yes").Click could be written:
dialog("nativeclass:=#32770").dialog("nativeclass:=#32770").Winbutton("text:=&Yes").Click
4. You can use object spy feature of QTP to know the object properties and object hierarchy level.