SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2002
    Location
    Southborough, MA
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A question about \"error handling\"

    Hi,

    The purpose of this simple script is to compare 4 bitmaps. Script
    will abort because 1st bitmap does not match.

    All I want to do is to add some error handling to make it going
    thru the whole script.

    Why SilkTest does not allow me to add "do...except..." at the
    place I wanted? (misplaced "except" statement when complie)

    Where should I put my "do... except...", thanx. Please send an
    e-mail to "mz1234@hotmail.com", thanx.

    The script is in the attachment. Again, thanx.


    Min Zhang
    mz1234@hotmail.com

    -------------------------------------

    [-] testcase Test2 ()
    [ ] BrowserPage.SetActive ()
    [ ] Browser.Maximize ()
    [ ] Browser.Location.SetText ("http://qawebserver2:8700/servlet/data")
    [ ] Browser.Location.TypeKeys ("<Enter>")
    [ ] BrowserPage.SetActive ()
    [ ] BrowserPage.HtmlTextField("User ID:|#1|$DHUserName").SetText ("mz1")
    [ ] BrowserPage.HtmlTextField("Password:|#2|$DHPasswor d").TypeKeys ("<Tab>")
    [ ] BrowserPage.HtmlTextField("Password:|#2|$DHPasswor d").SetText ("mz1")
    [ ] BrowserPage.HtmlPushButton("Login|#1|$DHAction[1]").TypeKeys ("<Tab><Enter>")
    [ ] BrowserPage.BrowserChild("docHarbor Data Servlet[2]").HtmlListBox("Please select document type:|#1|$retrievaltypelist").DoubleSelect ("FC Production Report")
    [ ] BrowserPage.BrowserChild("docHarbor Data Servlet[3]").HtmlPopupList("Account Number:|#1|$operatorsIF_Accountnumber").Select ("not null")
    [ ] BrowserPage.BrowserChild("docHarbor Data Servlet[4]").HtmlRadioList("#1|$searchmode").Select ("All")
    [ ] BrowserPage.BrowserChild("docHarbor Data Servlet[4]").HtmlPushButton("Search|#1|$Search").Click ()
    [ ] BrowserPage.BrowserChild("docHarbor Data Servlet Search Results").HtmlTable("#1").HtmlColumn("#2").HtmlLin k("View[1]|#1|$javascript oViewClick(1);").Click ()
    [ ] BrowserPage.HtmlLink("Click to view the FC Production Report Document (1303K)|#2|$http:??qawebserver2:8700?reportcache?1 a_3A3cebbd16_3Ac94afe6371[2]").Click ()
    [ ]
    [ ]
    [ ] do
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVSplitte rView|$0[2]").CustomWin("[AVL_AVView]AVScrollView|$0[2]").CustomWin("[AVL_AVView]AVPageView|$0[1]").ClientArea.VerifyBitmap ("C:\Program Files\Segue\SilkTest\MinZhang_Projects\FCProd_Wind ow\FCProd_C_1.bmp")
    [ ] except
    [ ] ExceptLog ()
    [ ]
    [ ]
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVToolBar Easel|$0[1]").CustomWin("[AVL_AVView]AVToolBarView[2]|$0[2]").Click (1, 65, 17)
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVSplitte rView|$0[2]").CustomWin("[AVL_AVView]AVScrollView|$0[2]").CustomWin("[AVL_AVView]AVPageView|$0[1]").ClientArea.VerifyBitmap ("C:\Program Files\Segue\SilkTest\MinZhang_Projects\FCProd_Wind ow\FCProd_C_2.bmp")
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVToolBar Easel|$0[1]").CustomWin("[AVL_AVView]AVToolBarView[2]|$0[2]").Click (1, 66, 11)
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVSplitte rView|$0[2]").CustomWin("[AVL_AVView]AVScrollView|$0[2]").CustomWin("[AVL_AVView]AVPageView|$0[1]").ClientArea.VerifyBitmap ("C:\Program Files\Segue\SilkTest\MinZhang_Projects\FCProd_Wind ow\FCProd_C_3.bmp")
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVToolBar Easel|$0[1]").CustomWin("[AVL_AVView]AVToolBarView[2]|$0[2]").Click (1, 64, 15)
    [ ] BrowserPage.CustomWin("[AfxOleControl42s]#1|$0").CustomWin("[AfxWnd42s]#1|$0").CustomWin("[Amber External Window]http:??qawebserver2:8700?reportcache?1a_3A3cebbd16 _3Ac94afe637114b28f_6073273657843219886.pdf|$0").C ustomWin("[AVL_AVView]AVDocToolView|$0").CustomWin("[AVL_AVView]AVSplitte rView|$0[2]").CustomWin("[AVL_AVView]AVScrollView|$0[2]").CustomWin("[AVL_AVView]AVPageView|$0[1]").ClientArea.VerifyBitmap ("C:\Program Files\Segue\SilkTest\MinZhang_Projects\FCProd_Wind ow\FCProd_C_4.bmp")
    [ ]
    [ ] Browser.Back.Click ()
    [ ] Browser.Back.Click ()
    [ ] BrowserPage.BrowserChild("docHarborFrame_hitlistbu tton").HtmlLink("Logout|#1|$javascript oLogoutClick();").Click ()

    ------------------

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A question about \"error handling\"

    It fails because your indent level are incorrect. Compare it with this:

    [-] main()
    [ ] test2()
    [ ]
    [-] testcase Test2 ()
    [-] do
    [ ] Print(1/0)
    [-] except
    [ ] ExceptLog()

    [ ] ExceptLog()


    ------------------

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A question about \"error handling\"

    exactly between Do and except the code should be right indent by one unit

    ------------------
    Sree
    Sree

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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:35 AM.

Copyright BetaSoft Inc.