SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cannot use DialogBox window declarations

    In our aut, whenever there is a dialogbox to confirm or reject something, we would like to be able to have a separate window declaration for each, in order to make the code more maintainable (I really dislike having MessageBox.OK.Click() all over the place, because it is so ambiguous as to what is happening there). In the MessageBoxClass entry in the language reference, it says that "if you have an explicit declaration for a specific messagebox, silktest uses it instead of the generic messagebox declaration". It is this bit that isn't working - if we have a window declaration for a dialogbox of this kind, then silktest will always see it as MessageBox at runtime, and the script will fail because it 'fails to find' the window the script is referring to. And then, infuriatingly, the recovery system has no difficulties spotting and closing the dialog.
    Has anybody else had this problem?

    P.S. I am running Silk 5.0.1, an an aut written in Visual Objects. My guess is that it is one of the many places that silk doesn't quite get things right with apps written in this language, but I was wondering if it was more general, or if there was a known workaround.

  2. #2
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use DialogBox window declarations

    Using SilkTest 5.0.3.1 we are seeing a similar situation using a VisualBasic 6 application. But it appears to be a little different then your description.

    1. We record a new Test Frame file for the project. During that process Silk creates the generic MessageBox declaration using the following syntax:

    2. We then record window decs for a unique dialog, who's WindowID is $MessageBox, but which has a unique Caption tag. Silk records, using the dialog's Caption for the tag:

    3. At this point we can hand code, but not record, 4Test statements which interact with the OpenCourse dialog at runtime--the recorders and recovery system always refer to the OpenCourse dialog as the default MessageBox. This isn't really so bad, and many applications under test can probably live with this situation.

    If you find a way to declare the tag, such that the records, recovery AND runtime all work correctly using the dialog's defined name please post it here. [Be aware that there are some tag techniques which I have tried that allow the recorders to work, but then the dialog is not recognized at runtime].

    -fyi, Terry Horwath



  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use DialogBox window declarations

    Well, I'm trying a fairly extreme solution - comment out the MessageBox declaration, and replace every call to MessageBox with a call to a specific, separately declared dialogbox.

    This does seem to be generally working so far - certainly nothing has complained about the MessageBox declaration being missing, in compilation, in recording, in runtime, and in particular in the recovery system. I might actually recommend this to all new users of silktest, because it is does make code more maintainable when every reference to a dialogbox is nice and unambiguous.

    The only thing I haven't tried is recording testcases, because we don't use that functionality of silktest, but I will have a go with it and see what it comes up with.

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use DialogBox window declarations

    The first thing I do when creating a new frame is get rid of the generic message box declaration. Silktest does not rely on it being there for recovery. It will use the default options for closing a message box or dialog box that are in the runtime options if it can['t figure out what else to do with it though.

 

 

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 09:26 AM.

Copyright BetaSoft Inc.