SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Sep 2001
    Location
    California, USA
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Verify Value on one page is same as Value on another page

    Hello:

    I am attempting to verify that a Text value on one page matches a value on another page.

    For example, in the site I am testing I enter a dollar value for an investment account. Two pages later this value I entered appears in a total field. Both values should be the same. (Even though these are integers they are saved on our site as Text Values)

    I looked through the SilkTest (5.5.3) help and was flooded with numerous Verify Functions.

    Anyone know if this test calls for a Verify function? If yes any idea which one to look for?

    [This message has been edited by CrazyQABoy (edited 12-03-2002).]

  2. #2
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verify Value on one page is same as Value on another page

    you have 2 options I think. First one is the plain Verify (aActual, aExpected [, sDesc]) function.(look up verify function in the help)

    If you have either a DynamicText class, StaticText class, or TextField class you can use object.VerifyValue (Expected)
    (look up verifyvalue in the help)

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com

    [This message has been edited by rmccullough (edited 12-03-2002).]
    Ryan McCullough
    RightNow Tech. Inc.

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verify Value on one page is same as Value on another page

    You could assign the text value to a string variable on each page and see if they are equal.

    String sVal = MyWindow.MyText.GetText()
    // navigate to the second page.

    if MyNextWindow.MyNewText.GetText() != sVal
    // Houston, we've got a problem here.

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

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Location
    California, USA
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verify Value on one page is same as Value on another page

    Thanks for the responses Ryan and DJ. I'm still in the infancy stages of using Silk Test. I was able to compare values successfully using both of your advice.

    While creating this string my coworker and I came upon another issue related to comparing values. The values are constantly changing because our site is a financial site.

    In the string below:

    sVal = ASIAssetSelectionConfirmat.N480002.GetText()

    The mytext value of N480002 is constantly changing. Do you know how to identify the mytext field as a field that constantly changes? We tried using an asterisk (*) but were getting the message: [ ] *** Error: Window '[HtmlText](*)' was not found
    [ ] Occurred in GetText

    Any ideas on how to replace a static mytext value with one that is constantly changing?


    [This message has been edited by CrazyQABoy (edited 12-05-2002).]

  5. #5
    Junior Member
    Join Date
    Mar 2002
    Location
    Robbinsdale, MN USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verify Value on one page is same as Value on another page

    View the Multitag declaration page in the SilkTest help, it has a bunch of helpful ideas for dealing with different window declaration issues.

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

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

    Re: Verify Value on one page is same as Value on another page

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by CrazyQABoy:
    In the string below:

    sVal = ASIAssetSelectionConfirmat.N480002.GetText()

    The mytext value of N480002 is constantly changing.
    <HR></BLOCKQUOTE>

    "N480002" is just one value of many that are possible for that field, right?

    Change the name to something that generically identifies the purpose of that particular control. Then change the tag to something like "#1" (assuming that that is the first instance of that class).


    John


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

  7. #7
    Senior Member
    Join Date
    Sep 2001
    Location
    California, USA
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verify Value on one page is same as Value on another page

    John

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John J. Miller:
    "N480002" is just one value of many that are possible for that field, right?<HR></BLOCKQUOTE>
    Yes, "N480002" is one of many values that are possible for this MyText field.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John J. Miller:
    Change the name to something that generically identifies the purpose of that particular control. Then change the tag to something like "#1" (assuming that that is the first instance of that class).
    <HR></BLOCKQUOTE>
    I did as you recommended above and the test case compiled and ran successfully.

    After reading through the "# character in tags" section of Silk Test help I interpret the # symbol as a tag identifier that can accept a new value every time. Not as sure what the "1" means but I assume that if this tag existed elsewhere I would have to identify it as "#2" and so on.

    Thanks for the help.

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

    Re: Verify Value on one page is same as Value on another page

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by CrazyQABoy:

    After reading through the "# character in tags" section of Silk Test help I interpret the # symbol as a tag identifier that can accept a new value every time. Not as sure what the "1" means but I assume that if this tag existed elsewhere I would have to identify it as "#2" and so on.

    <HR></BLOCKQUOTE>
    It's best to think of "#-number" values as representing an index into a list which Silk maintains.

    If a dialog has 3 instances of a text field class inside it, "#3" would identify the third field (in a left to right, top to bottom ordering). What's actually in that field doesn't matter when using this tag-form; Silk only knows that you want to interact with the 3rd instance.

    John


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

 

 

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:46 PM.

Copyright BetaSoft Inc.