Micro Focus QTP (UFT) Forums
QTP Doubts - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP Doubts (/Thread-QTP-Doubts)



QTP Doubts - Forrest Gump - 09-04-2011

Hi All,

1. Is it possible to execute QTP scripts line by line manually i.e., by some functional key press (Eg: F2 or F3 or F4 etc.,)

I want this to see how each line of code behaves in the script.


2. What is the purpose of "Update Run Mode". Can somebody explain this with an example.

3. How to use index in QTP?

Please help.

Thanks and Regards,
- Gump


RE: QTP Doubts - Ankesh - 09-05-2011

Hi Gump,

1) U can use F10 to debug ur code line by line. To debug a function u can use F11.
2) Update run mode will update the checkpoints to the current values that appear when the test case is executed.
3) Sometimes, on a page there may be different webelements with similar properties. It becomes hard for QTp to identify them. In such cases we make use of the Index value which uniqu to the object.

Regards,
Ankesh




RE: QTP Doubts - Forrest Gump - 09-06-2011

Hi Ankesh,

Thanks for replying and your time.
Is it possible for you to explain 2nd point with an example?

I know the purpose of using "index". My Question was to know "How".

please guide me.

Thanks and Regards,
- Gump

Hi,

I tried "F10". It is just highlighting "File" menu but not executing.
I tried "F11" also but its opening "Run" window.

Please help


RE: QTP Doubts - suresz449 - 09-06-2011

In your Script starting point you have to put Debug Point and run your program, it shows an arrow mark in your script at that time you have to use F10 function key.
Same procedure follow to function also use F11 key


RE: QTP Doubts - Ankesh - 09-06-2011

U need to put a breakpoint at the first line of the script. Then hit run or F5. The cursur will stop at the breakpoint inserted. U can then use F10 to debug line by line.

Regarding index, i used to assign an index number to the object in the object repository itself (Properties). This way the object will become unique.

Or u can use descriptive programming to assign an index.
Code:
Set  lnk_dept=Description.Create
    lnk_dept("text").value=strSuperDeptName
    lnk_dept("html tag").value="A"
    lnk_dept("height").value="28"

ur code shld be something like this....

Code:
Set  lnk_dept=Description.Create
    lnk_dept("text").value=strSuperDeptName
    lnk_dept("html tag").value="A"
    lnk_dept("height").value="28"
             lnk_dept("index").value="1"

Plz share the scenario u want to automate for better answer.