SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Dec 2002
    Location
    Bangalore
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Closing Script Programmatically

    Hi,
    How do we end a script programmatically. I tried :

    Dim WshShell
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Quit ()

    But I am getting an error, The object doesnt support this property or method.

    Any suggestions ?
    Thanks,
    Kishore Negi

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Closing Script Programmatically

    What is that you are trying to achieve??

  3. #3
    Member
    Join Date
    Dec 2002
    Location
    Bangalore
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Closing Script Programmatically

    I want to terminate the script execution based on some conditions in my application. If conditions are met then the script should terminate without waiting for the usual termination of the script.
    Thanks,
    Kishore Negi

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Closing Script Programmatically

    Quit function is not available for WShell object instead its for WScript so you need to modify your code i guess

  5. #5
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Closing Script Programmatically

    How about ExitRun within the script?

    ie. If blnStopTest Then
    ExitRun("Run Stopped due to condition being met")
    End if

    There are actually a number or "Exit" statements with in QTP such as ExitGlobalIteration, ExitTestIteration, ExistTest, etc.

    Have a look in the help guide. It's all pretty self explanatory.

  6. #6
    Member
    Join Date
    Dec 2002
    Location
    Bangalore
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Closing Script Programmatically

    Hey Robbie,
    Thanks a ton dude.... ExitRun worked [img]/images/graemlins/smile.gif[/img]
    Thanks,
    Kishore Negi

  7. #7
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Closing Script Programmatically

    [ QUOTE ]
    Hey Robbie,
    Thanks a ton dude.... ExitRun worked [img]/images/graemlins/smile.gif[/img]

    [/ QUOTE ]

    It's my pleasure matey. Hopefully I'm helping people as much as this forum is helping me.

    p.s. It's always nice when the person has tried an approach already rather than just asking the question without thinking for themselves!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:10 AM.

Copyright BetaSoft Inc.