SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jun 2000
    Location
    CA
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    verifying icon in a treeview

    i have an AUT under test has a treeview. the items on this treeview have status icons that will indicate the state of the item. my problem is, SilkTest does not see those icons. i attempted to do getitemimageindex () but this doesn't work since the icon can't be seen by SilkTest.

    my last resort is to do a bitmap capture (which i have been avoiding). now, i need help on how i could best use this bitmap feature. is there a way i can just capture the bitmap and use it for comparison later? also, i am anticipating a problem to use this since the itemcnt of my treeview is dynamic and the objects as well. or this shouldn't be a problem?

    any guidance and direction on how to go about this will be much appreciated.

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

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: verifying icon in a treeview

    Here's a place to start.

    You can do GetItemRect () on a treeview, which will give you the location of a specific item. That will return a RECT.

    RECT r = wTreeView.GetItemRect ("/branch/branch/item")

    Pass that rect to the method

    wTreeView.CaptureBitmap ("sfile.bmp", r)

    Then look at that bitmap and make sure it includes the image you're after.

    If it does, you can manipulate the rect (r) to capture just the image. Then you could compare the image to ones stored on disk to see which image is beside a particular treeview item.

    Email me for more details.

    Hope this helps.


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  3. #3
    Senior Member
    Join Date
    Dec 1999
    Location
    Sarasota FL USA
    Posts
    109
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: verifying icon in a treeview

    We use the image ID to check the bit maps. This will give an index number of the current bit map that is used for an item in the tree. (We make the assumption that the developers have put the correct images in the image list.) in our case, this was a much better process then comparing the actual bitmap images. For that, we rely on the manual testers to do a quick visual check. We have also used this to our advantage to have the developers ‘mark’ special documents. For example, a standard document would have the normal paper icon and index of 1. For special documents (meaning special consideration when opening from an automation script) the same physical image is used but it is given another index.

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

 

 

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 06:01 PM.

Copyright BetaSoft Inc.