SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2003
    Location
    Tampa
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Recovery approach - can\'t decide

    Hello, I've been searching this board for a few days now and got totally confused. I'm currently using "If Then" logic to trap the expected error messages (application is Java thick client). However, the problem appears during the execution of the Smoke test when application starts giving unexpected error messages. Some of them are fatal and require exiting from the script, others are recoverable meaning the script can continue once error is removed (click OK). I'm contemplating to use the Recovery Manager and want to create the .vbs file which would have function handling different errors depending on the label or partial text of the error message. I would then call this file from Recovery Manager (or is there a better way to get to it on error?) Has anyone done something similar to it? Is this an easiest and efficient way? I'm not a big expert in VB script, so writing complicating function will be difficult. An example of such a function and how to call .vbs file is greatly appreciated.

  2. #2
    Member
    Join Date
    Apr 2005
    Location
    Pune
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Recovery approach - can\'t decide

    I am telling you before hand ... don't use more than a couple of recovery scenarios. They are not 100% reliable and will make the execution slow. Try to use as much regular expressions as possible, both in your .vbs file and while creating a recovery scenario.

    Cheers!
    Kapil.

  3. #3
    Member
    Join Date
    Aug 2008
    Location
    Singapore, Singapore
    Posts
    100
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Recovery approach - can\'t decide

    You can use if statemets to capture the inner text of the message boxs and according to the message box displayed you can give the recovery scenarios, either to close the box by clicking on the dialogue box and continuing with the rest of the flows or loging off the application and exiting. Using recovery scenarios with if else is better and more precise and reliable rather than using the wizard which will execute for all the steps and make your scripts slow.

  4. #4
    Member
    Join Date
    Feb 2007
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Recovery approach - can\'t decide

    I use Recovery Scenario with Function call to deal with unexpected pop up (error message).

    My application generates all Unexpected Pop Up with Native Class = #32770.

    I use to look for each existing pop up window with this native class. If one is found depending on the window title actions can be performed. You can also inculde code to take screen shots of all unexpeted error.

    Here is the code I use in my script.

    Function RecoveryFunction1(Object)
    nat = object.GetRoProperty("nativeClass")
    If nat = "#32770" Then
    On error resume next
    object.highlight
    takePicture(object)
    object.close
    On Error Goto 0
    Else
    End If
    End Function


    Public Function takePicture(obj)
    On error resume next
    Set oWord = CreateObject("Word.Application")
    oWord.documents.open "c:\Error.doc"

    Set oDoc = oWord.ActiveDocument

    obj.CaptureBitmap "c:\Result\temp1.bmp", True

    pic = "c:\Result\temp1.bmp"

    Set oRange = oDoc.content

    oRange.ParagraphFormat.Alignment = 0

    oRange.insertafter vbcrlf '& " " & vbcrlf

    oRange.collapse(0)

    oRange.InlineShapes.AddPicture pic, False, True

    oWord.ActiveDocument.Save

    oWord.Application.Quit True

    Set oRange = Nothing

    Set oDoc = Nothing

    Set oWord = Nothing



    On Error goto 0

    End Function


    __________________________________________________

    Hope this helps

  5. #5
    Junior Member
    Join Date
    Aug 2003
    Location
    Tampa
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Recovery approach - can\'t decide

    Thanks guys!

 

 

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 10.00%
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 08:24 PM.

Copyright BetaSoft Inc.