SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Trouble with OLE in Rational Visual Test 6.5

    Hi All,

    I'm having trouble clicking a custom button in my app using Rational Visual Test 6.5. I need to check if the caption of a button is the caption that I'm looking for, then I need to click the button, but I'm getting an error "unable to get control rect". The button is on the 'footer' of the form, and is part of a control array, and I think that might be the problem. If anyone has any ideas, please scream.

    Here's the function:

    If OleCtlExists(strOrd) <> 0 Then
    If OleCtlHasProperty (strOrd, "Caption") = True Then
    If OleCtlGetProperty (strOrd, "Caption") = strCaption Then
    OleCtlClick(strOrd) ' -- PROBLEM OCCURS ON THIS LINE
    End If
    End If
    End If

    Regards

    Sonia Leijenaar

  2. #2
    SQA Knight
    Join Date
    Sep 2001
    Location
    Bangalore,India
    Posts
    2,549
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Trouble with OLE in Rational Visual Test 6.5

    Hey,
    You can achieve in 2-3 ways.
    1. Map that custom class to button class and then get caption.
    2. You can try MSAA controls/Properties.
    3. Try how to get custom control properties.
    Thanks & Regards,
    Palani.
    http://tips-testing.blogspot.com/index.html
    Quote: Donít hesitate to initiate!

  3. #3
    Junior Member
    Join Date
    Aug 2004
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Trouble with OLE in Rational Visual Test 6.5

    I tried to map the custom class to the button class as well, but it seems that only some of the buttons are now recognised using the caption property. I've also got a function that checks if controls are on a form, and it doesn't seem to pick up controls in a control array.

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Location
    Houston, TX, USA
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Trouble with OLE in Rational Visual Test 6.5

    Sonia,

    I assume you can't just wFndWnd the caption string and test it that way, like so?

    if WfndWnd("MyButtonCaption", FW_FOCUS) = 0 then
    FAIL "MyButtonCaption not found."
    end if

    Ian

  5. #5
    Junior Member
    Join Date
    Aug 2004
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Trouble with OLE in Rational Visual Test 6.5

    Unfortunately not... it's as if the button doesn't even exist

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 01:46 PM.

Copyright BetaSoft Inc.