Forum Discussion

vthomeschoolmom's avatar
vthomeschoolmom
Super Contributor
14 years ago

Delphi NOOB - a treeview

My colleague who normally works on the Delphi application regression scripts is on an extended vacation. I have to change one. I know I have a tds file that I need.



I have a tree view. The object reported in the Object Spy is



Sys.Process("ee10").VCLObject("frmOpenStudy2").VCLObject("ElTree1").Window("TElTreeView", "", 1)



The parent, obviously is



Sys.Process("ee10").VCLObject("frmOpenStudy2").VCLObject("ElTree1")



I want to be able to ClickItem or address the trees directly to select an object. Does anyone have experience with this object? I know this is a total noob question. I appreciate the help.



S
  • I wonder why when I record, the ClickItem is not used but click to coordinates on the window object instead?
  • So I am looking at the treeview. It looks like the top node is <blank> with child nodes under them. I tried



    tvwOpenProject.ClickItem "|<blank>"



    and received error The TreeView node '<blank>' not found.



    I tried



    tvwOpenProject.Items.Item(5).Click



    Object doesn't support this property or method: 'tvwOpenProject.Items.Item(...).Click'



    tvwOpenProject.ClickItem "|[1]|[1]"     



    The TreeView node '[1]' (and the same when I tried 0, don't know what the index base is) not found.



    Something weird is going on?
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Lane,


    I wonder why when I record, the ClickItem is not used but click to coordinates on the window object instead?


    It's weird. The control seems to be recognized as Open. So, the clicks must be recorded with the ClickItem method. However, it's difficult to say anything without reproducing the problem. To know the reason of this behavior, I recommend that you contact our Support Team and send them your tested application.


    tvwOpenProject.ClickItem "|<blank>"


    and received error The TreeView node '<blank>' not found.



    It's good as it means that the object has the ClickItem method. However, the item with the "<blank>" name is absent.


    tvwOpenProject.Items.Item(5).Click


    Object doesn't support this property or method: 'tvwOpenProject.Items.Item(...).Click'



    Try using the tvwOpenProject.wItems.Item(5).Click method. As far as I know, tree views have the wItems property, not the Items property.

    If it doesn't work, please obtain the value returned by the tvwOpenProject.wItems.Count property. What does it return?


    Thanks :)

  • The support model that requires sending in the app under test is very difficult. We can't send the application under test because its security model won't allow it. Oft times the development staff is under pressure to deliver product and cannot spend the time to make a sample app for us. And when they can, of times we cannot reproduce the problem.



    I wonder if it would make more sense to use windows remote assistance or something?



    wItems generated an object not found error.



    Thanks



    S
  • tvwOpenProject.wItems.Count



    wItems does not have a count



    tvwOpenProject.Items.Count is 9



    There are nine nodes in the tree.
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Lane,


    I wonder if it would make more sense to use windows remote assistance or something?


    Please contact our Support Team on this issue and send them:

    1. Your TestComplete project (with all the scripts and log files).

    2. The snapshot with all the properties of the tvwOpenProject control (for more information on saving snapshots, see the Using Snapshots section of the Object Browser Overview help topic).


    Thanks.

  • I tried to submit (twice) and received a connection time out error. Can you let me know if the submission was received?



    Thanks


  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Lane,


    I checked the messages in our DB and didn't find yours. So, I recommend that you try submitting the request one more time. After the submission is finished successfully, you'll receive the messages with the ticket number. You can post this number here, and I'll let you know whether we received it and whether the message is in process.


    Thanks.