SPONSORS:






User Tag List

Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is the problem with this simple code?

    I have a lot of message boxes with identical titles. So I decided to make the tags unique by doing the following : Notice tag

    [-] window DialogBox Sample100
    [ ] tag "Sample Dialog/[StaticText]The dates*/.."
    [ ] parent SampleApp
    [+] PushButton OK
    [-] multitag "OK"
    [+] StaticText DatesOverlap
    [+] multitag "The dates*"

    Before my tag was: tag "Sample Dialog"
    And I was able to click OK. Now I complains that OK button don't exists, Even though it
    sees dialog as 'Sample100' dialogBox but can't find / push OK button.

    My app is client/Server

    [This message has been edited by KS (edited 05-23-2001).]

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the problem with this simple code?

    This topic talks about changing the window(or dialogbox) caption so you can identify each of them uniquely. It uses the winApi include file.
    http://www.qaforums.com/Forum1/HTML/000001.html

    This method doesn't work for browsers since when chaging or reload page it might reset everything including caption.

    Also if you don't like the above you can also use the array like declarations(Dialogbox("name[1]"),DialogBox("name[2]"))

    Then you can't have a static declaration since the top most dialogbox will have the index changed to 1.


    [This message has been edited by GodKnows (edited 05-23-2001).]

  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: What is the problem with this simple code?

    Your tag wants to be:

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

  4. #4
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: What is the problem with this simple code?

    KS,

    From your simple code (unmodified of course or unless it is a "typo"),
    you have a multitag for "OK" but it shows only one tag (as in [-] multitag "OK"). It has to be more than one or else you should change it to just plain 'tag "OK"'.

    Try re-recording your Windows Declarations and double check the Options to see if you are using the "Caption and Windows ID" or "Caption and Index" for you multitags.


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

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

    Re: What is the problem with this simple code?

    Gilbert - is there a problem with specifying a multitag with only one tag? I have never noticed it causing any odd behavioural issues myself.

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

  6. #6
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the problem with this simple code?

    [+] window DialogBox DatesOverlap
    [ ] tag "Demo"
    [ ] parent MainDemo
    [+] PushButton OK
    [-] multitag "OK"
    [ ] "$1001"
    [-] StaticText DatesOverlap
    [+] multitag "The dates*"
    [ ] "$1017"

    with the above code i can push OK button. But when It is changed to the following OK can't be clicked. It complains that It doesn't exists:

    [+] window DialogBox DatesOverlap
    [ ] tag "Demo/[StaticText]The dates*/.."
    [ ] parent MainDemo
    [+] PushButton OK
    [-] multitag "OK"
    [ ] "$1001"
    [-] StaticText DatesOverlap
    [+] multitag "The dates*"
    [ ] "$1017"

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

  7. #7
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: What is the problem with this simple code?

    Vince is right! Multitag statement does not complain even if you specify only one tag.
    Sounds like a SilkTest bug to me!
    And I believe he's also right in that your main tag for the dialog should include the [DialogBox].
    You may want to check out some samples in the Online Help (search for Multitag).

    KS,
    Since message boxes usually contain the same objects (PushButton, Text Message, etc.), and that what most people do with them is just verify the Text Message, I don't understand why you would have to declare them separately!? Unless your message boxes contain controls such as TextFields, PushButtons that differs from one message box to the other, which I doubt you have.


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


    [This message has been edited by Gilbert (edited 05-24-2001).]

    [This message has been edited by Gilbert (edited 05-25-2001).]

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

    Re: What is the problem with this simple code?

    Gilbert - I find it most easiest to declare all my app's dialogboxes separately, and that way it is easiest to confirm that the correct one has appeared (with a simple call to the Exists() method). There are two reasons for this:
    - I keep the text to be searched for in the window declaration instead of in a testcase - better for maintenance.
    - I often need to override the Close() method for different dialogboxes. For example with one dialog it is necessary to hit OK to close it down (and allow a different window to be closed), while with others it is necessary for Cancel to be clicked. If the recovery system is trying to close a dialog down, then I sometimes need to have these declarations to help it along.

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

  9. #9
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: What is the problem with this simple code?

    Vince,

    That's good! But, I'm just talking about the original posting from KS where he mentioned about "many message boxes (not dialog boxes) having the same captions". Why have separate declarations for these, if assuming that the only thing that changes is the Text Message?


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

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

    Re: What is the problem with this simple code?

    Sorry, I'm not sure of the functional distinction between a messagebox and a dialogbox in this context?

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

 

 
Page 1 of 3 123 LastLast

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 12:24 PM.

Copyright BetaSoft Inc.