SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Salt Lake City, UT
    Posts
    39
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Want to capture the property VALUE of a control

    I'm working with a Delphi app that has a dynamic display. I'd like to assign the value of a property to a variable. My first thought was to Store the object, then use the stores to identify the object/property/value:

    variable := Objects.StoredObject['Stored_Object'].Properties[2].Value;

    Nope, that only gives me the stored value.

    I can Find the object:
    p := Sys.Process('Application');
    variable := p.Find(PropArray, ValuesArray, 1000);

    But that saves as an object. The value is displayed in the Object Browser.

    How do I capture the Value of the Object/Property?

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Hi,

    You need to simply address the needed property in your script:
    <font class="small">Code:</font><hr /><pre>
    p := Sys.Process('Application');
    variable := p.Find(PropArray, ValuesArray, 1000);
    propValue := variable.MyProperty;
    </pre><hr />
    Jared - AQA Support

  3. #3
    Senior Member
    Join Date
    Mar 2007
    Location
    Mumbai, India
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Regards,
    Performance Learner

  4. #4
    Member
    Join Date
    Mar 2009
    Location
    Salt Lake City, UT
    Posts
    39
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    I must be thick as a brick. I have review your comments and the other post but I am hitting the error "The object does not exist" on the Comp_Value line. Attached is a snap shot of the code. I'm attempting to capture the dynamic value of the WindCaption property: '09-098-543853'.
    Attached Images Attached Images

  5. #5
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Hi,

    I suggest that you call the Process.Refresh method before using Find. Does this help?
    Jared - AQA Support

  6. #6
    Member
    Join Date
    Mar 2009
    Location
    Salt Lake City, UT
    Posts
    39
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Nope.

  7. #7
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Hi,

    OK, in this case, it looks like the caption has changed. You need to either remove it from the recognition parameters or use wildcards to ignore unstable parts.
    Jared - AQA Support

  8. #8
    Member
    Join Date
    Mar 2009
    Location
    Salt Lake City, UT
    Posts
    39
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Jared,
    'the caption has changed'- compared to what? The caption value changes with each iteration of the AUT. It's the dynamic caption I'm attempting to capture. Do you mean the current value compared to the array value?

  9. #9
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    Hi,

    I mean, the actual caption is not the same as the one you are using in your code - that is, the value you save in the array. So, your script tries to find the object by using an incorrect value and fails.
    Jared - AQA Support

  10. #10
    Member
    Join Date
    Mar 2009
    Location
    Salt Lake City, UT
    Posts
    39
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Want to capture the property VALUE of a control

    I believe I have found the root problem. Property values are not being refreshed when a new record is opened. I do call Process.Refresh; prior to the Find statement. However, even a &gt;R.Click &gt;Refresh in the object browser window does not refresh the property values. This is a Delphi app. The only way I can refresh the properties is to close the AUT and open a new record. Has this been encountered with other Delphi apps?

 

 
Page 1 of 2 12 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
  •  
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 10.34%
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 08:17 AM.

Copyright BetaSoft Inc.