SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Guest

    How to verify one item in a list of items?

    Background: Using SilkTest 5.5 to test a Java application

    Currently, I am writing a testcase which tests an advanced search functionality. The application is designed to search on many items such as company name, currency, country etc. Then the application returns a list of all results than match my search criteria.

    Problem: I want to use the VerifyProperties method (or another method) to verify the one specific test item that I am searching for. As I change my search criteria many of the search results will change, however, my test item should always appear in the list regardless of what search combination I use. I have tried various combinations of the VerifyProperties method, however, I always get an error message b/c of the additional results that appear also.

    Example Code: [-] SearchResults.SearchResultsTable.VerifyProperties ({...})
    [ ] ""
    [-] {...}
    [ ] {"$Text", "TK_368849=361 ABBEY NATIONAL"}

    Error message:
    [-] Testcase Extended_Search - 1 error
    [ ] *** DefaultBaseState is invoking AC_Desktop
    [ ] *** Error: Verify properties failed
    [ ] Occurred in SearchResults.SearchResultsTable.VerifyProperties
    [ ] Called from Extended_Search at extended_search.t(62)
    [ ] *** DefaultBaseState is closing AC_Desktop windows
    [ ] Closing SearchResults


    Can anyone tell me how to verify one item in a list of items or direct me to the appropriate help files?

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

  2. #2
    Junior Member
    Join Date
    Feb 2002
    Location
    Kiowa, CO,USA
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to verify one item in a list of items?

    My first impulse is to do away with the VerifyProperties call. Rather, I'd use GetContents () to trap the table entries (I suspect you'll need to play with this some if you've got multiple columns) and then ListFind to determine whether my target value is present:

    [ ] LIST OF STRING lsContents = SearchResults.SearchResultsTable.GetContents ()
    [ ] if ListFind (lsContents, sMyExpectedValue) == 0
    [ ] // target value not found
    [ ] RaiseError (1, "ERROR...")



    ------------------
    jlamprech@yahoo.com
    Jon A. Lamprech
    jlamprech@yahoo.com

 

 

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

Copyright BetaSoft Inc.