Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Count the number of times the object appeared in the run
#4
Solved: 11 Years, 5 Months, 2 Weeks ago
@qtpDeepak - Please wrap your code whenever you post.

The solution you have provided is not correct. This will always print 1 popup for the first reporter, 2 for the second one irrespective of how many times it comes up. The reason being, If is a conditional loop which will enter only once. Your counter will take iterate only once depending upon the previous k value. Morever your counter is not capturing multiple occurences of the same popup during the same instance.

Iteration counters are in the logical loop, for Next and While wend or if you require in the run instance then the occurences of the object needs to be counted and stored in the variable separately.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.


Messages In This Thread
RE: Count the number of times the object appeared in the run - by basanth27 - 10-07-2009, 03:30 PM

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: 6 Guest(s)