Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Doubts
#1
Solved: 10 Years, 9 Months ago
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
Reply
#2
Solved: 10 Years, 9 Months ago
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

Reply
#3
Solved: 10 Years, 9 Months ago
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
Reply
#4
Solved: 10 Years, 9 Months ago
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
Reply
#5
Solved: 10 Years, 9 Months ago
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Doubts in automatino framewrok pkdhake 2 1,964 04-12-2013, 09:35 AM
Last Post: pkdhake
  doubts tirumal 1 2,145 05-10-2011, 11:02 AM
Last Post: Jay
MyBB Doble click doubts....... nileshpatil2521987 1 2,443 07-29-2010, 07:50 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)