Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Defining variable as Static in QTP script
#3
Solved: 10 Years, 10 Months, 1 Week ago
hi @ venkat,

i have a function called Fun1()
inside it i want to define a variable which should be static.
something like following:

--------------cut--------------------

Code:
Function Fun1()
   public Static totalSales  = 0
    totalSales +=1
End Function

--------------cut end --------------
so that each time i call this function ,totalSales should remain static.
Qtp pops an error messageBox while defining totalSales as Static.
when i tried this function without QTP , it works well.
Reply


Messages In This Thread
RE: Defining variable as Static in QTP script - by caze - 12-06-2009, 01:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using static descriptive programming how to count no. of objects on any webpage alpha1 4 6,753 08-11-2015, 08:48 PM
Last Post: kotaramamohana
  How to Verify Static Object Text which is changing Dynamically with Expected Result johnny77 0 3,203 06-25-2015, 11:32 AM
Last Post: johnny77
  Can you please help me in QTP DP to pass the variable name anshika.agarwal 1 2,620 09-04-2014, 06:43 PM
Last Post: anshika.agarwal
  Vierd problem with static descriptive programming Shwethareddy 7 4,216 10-19-2012, 10:35 AM
Last Post: Shwethareddy
  How to copy the content of a variable to clipboard - QTP 10 rohit330 2 17,353 02-22-2012, 08:29 PM
Last Post: rohit330

Forum Jump:


Users browsing this thread: 2 Guest(s)