Hi yaniv, Indeed i was referring to 'QTP' Script. And i have tried the way u told that is using a global variable and assigning the value of Err.Number to the global variable. But the problem is that it is not working while assigning "Err.Number", but i am able to assign other values or variables to the global variable and use the same in a different script. I am not sure why it is not working for "Err.Number". May be it is that Err.Number is a object property of "Error" object in QTP. Please let me know if you have any suggestions to overcome this problem.
Regards, Karthik V On Thu, Mar 26, 2009 at 2:27 PM, Yaniv Mendelson <yaniv...@gmail.com> wrote: > i didn't see any mention of "QTP" script in his question.... > > > > On Thu, Mar 26, 2009 at 6:59 PM, Roman Zilber <rzil...@gmail.com> wrote: > >> Yaniv, what is a scope if global variable in vbscript? It would be current >> vbscript script - not QTP script. The question was how to pass value from >> one script to another. I don't see VBscript way to do it, except using >> ExecuteGlobal statment, but it is a different story. >> >> >> On Thu, Mar 26, 2009 at 12:46 PM, Yaniv Mendelson <yaniv...@gmail.com>wrote: >> >>> set a global var , errNumber >>> errNumber="" >>> '--------------------------------------------------------- >>> and assign your err.Number to that: >>> errNumber=Err.Number >>> >>> Yaniv. >>> >>> >>> On Thu, Mar 26, 2009 at 5:37 PM, Roman Zilber <rzil...@gmail.com> wrote: >>> >>>> Environment("ERROR_NUMBER") = Err.Number >>>> >>>> >>>> On Thu, Mar 26, 2009 at 11:20 AM, kart <karthikv...@gmail.com> wrote: >>>> >>>>> >>>>> Hi guys, >>>>> >>>>> I have an issue here. See if you guys can help me out. >>>>> >>>>> I am trying to catch Error Number of the "Test Run Error" that can >>>>> occur in a Script having various functions ( assuming that "Test Run >>>>> Error" can occur in any of the functions) and pass it to a different >>>>> script. >>>>> The Error Number is stored in a variable "Err.Number". When the >>>>> control goes from the script in which the error occured to a different >>>>> script the value stored in "Err.Number" is setting to "0" where as i >>>>> want the actual Err.Number. >>>>> >>>>> Any suggestions towards this issue >>>>> >>>>> Regards >>>>> >>>>> Karthik V >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -~----------~----~----~----~------~----~------~--~---