Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Count the number of times the object appeared in the run
#6
Solved: 11 Years, 5 Months, 2 Weeks ago
Hi! Thanks for all your help, but Basanth is correct. The code only repeats the entire loop and iteration.

What I need to know is how can I show in the results that a particular window appeared nth times. Here goes the scenario.

I have an action that iterates 4 times when I run. This is because I have 4 sets of data. And for each iteration, a dialog box maybe displayed depending on the value inputted. I want to know how can I count the number of times that particular dialog box appeared in the run and display it (count) in the result. Below are some lines from the codes:

Code:
If  JavaWindow("WINDOW_NAME").JavaDialog("DATA").Exist Then
     Reporter.ReportEvent micDone, "Dialog box", "Dialog Box Appeared"
JavaWindow("WINDOW_NAME").JavaDialog("DATA").JavaButton("OK").Click
     counter = counter +1 'This is where I am trying to get the count but this variable resets to 0 every new iteration.
End If

Please advise.

Thank you!
Yono


Messages In This Thread
RE: Count the number of times the object appeared in the run - by yonobev - 10-08-2009, 08:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  swfwindow object name getting changed after each run saniya 1 1,751 10-10-2018, 09:02 PM
Last Post: TheGlovner
  Web Object Unique ID Number zunebuggy 0 1,598 07-10-2017, 05:37 PM
Last Post: zunebuggy
  QTP not recogonising object during run time Lavanya N 2 3,781 10-28-2015, 12:46 PM
Last Post: vinod123
  VB Script to count number of links in a web page. Suma Parimal 4 25,444 07-01-2015, 12:59 PM
Last Post: govind
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,185 12-20-2013, 01:44 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 2 Guest(s)