Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I make sure QTP will run all instructions NO skip?
#1
Not Solved
QTP Version 9.2
Add-Ins Web

Scenario:
In the following code, the QTP executes line #1, and jumps to execute line #2 however the application is still busy in line#1. The Line #2 is skipped and Value2 is not populated in Field 1.

Code 1:
Code:
#1.    Call SelectObject(.WebList("Field 1"), Value1)
#2.    Call SelectObject(.WebList("Field 2"), Value2)

In the following code, wait statement is used to wait for 5 seconds before running the next instruction.

Code 2:
Code:
#1.    Call SelectObject(.WebList("Field 1"), Value1)
#2.    wait(5)
#3.    Call SelectObject(.WebList("Field 2"), Value2)

Using wait statement between instructions at line #2, it works fine.

Issue:
If I remove wait statement from Code 2, sometime line #3 is skipped.
If I use Page.Sync at line #2, it does not do anything.

Question:
1. What is the best way to make sure that line #3 will not be skipped, and it will run regardless on fast or slow machine?
2. What I can use at line #2 instead of using wait (5) statement so that it makes sure line #3 will not execute until line #1 is completed successfully.

Thanks
Farhan
Reply


Messages In This Thread
How can I make sure QTP will run all instructions NO skip? - by farhanalam - 03-13-2009, 08:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,371 09-16-2018, 03:48 PM
Last Post: vijilesh
  How to make QTP Script to work when system gets locked? ramkumarad 6 11,923 11-02-2017, 03:37 PM
Last Post: Divv
  Local script to make compatible with QC automation2012 1 2,163 01-28-2015, 02:11 PM
Last Post: automation2012
  How to skip a For count? mv8167 2 2,418 10-23-2013, 07:06 PM
Last Post: mv8167
  How to make QTP take the value of a formula in a spreadsheet? utestqa 1 2,963 07-06-2013, 04:13 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)