Ask a Question

Need to read text of the tree view nodes WndClass=TElTreeView

shejuti
Occasional Contributor

Need to read text of the tree view nodes WndClass=TElTreeView

I am trying to read the text of some nodes. The class of the tree view is TElTreeView. I could not read the properties. I have tried this link- https://support.smartbear.com/viewarticle/26318/ but it isn't actually working because in my case it gets null for the node. I need to read the text (e.g. 'Rash;fungal') from the list. Has anyone tried this and able to work with this control. Help would be much appreciated.

1.jpg

8 REPLIES 8
Wamboo
Community Hero

Hello,

 

Could you take a screenshot of this object with ObjectSpy?

 

And the code you wrote?

 

Is the application in 'Debug' mode?

shejuti
Occasional Contributor

Hi,

Thanks for the reply. The application is in debug mode. I am attaching the objectSpy screenshots. I have tried accessing the nodes with below codes-

 

Aliases.CRS_Client.wndPatientClinicalRecordForm.PatientPageControl.TElTabSheet.PatientHistoryFrame.pnlLeft.pnlSummaryViews.xppSummaryViews.ElPageControlSummary.tabProblems.EltreeProblems.TElTreeView.SelectItem(0)

 

Aliases.CRS_Client.wndPatientClinicalRecordForm.PatientPageControl.TElTabSheet.PatientHistoryFrame.pnlLeft.pnlSummaryViews.xppSummaryViews.ElPageControlSummary.tabProblems.EltreeProblems.TElTreeView.ClickItem(0)

 

Aliases.CRS_Client.wndPatientClinicalRecordForm.PatientPageControl.TElTabSheet.PatientHistoryFrame.pnlLeft.pnlSummaryViews.xppSummaryViews.ElPageControlSummary.tabProblems.EltreeProblems.TElTreeView.ClickItem("Pain;ankle", 0);

 

But I get message- "The focused TreeView node has no children." even the methods from object recognition doesn't work on this.

KseniaSemina
SmartBear Alumni (Retired)

 

@shejuti , for TreeView controls, if you click on an item that begins at the root of the tree level, you need to place the " | " character at the beginning of the item tree path. An article that explains this is the following one: https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/tree-view/clickitem-action-treeview-control.html.

 

Let's try something like this:
Aliases.CRS_Client.wndPatientClinicalRecordForm.PatientPageControl.TElTabSheet.PatientHistoryFrame.pnlLeft.pnlSummaryViews.xppSummaryViews.ElPageControlSummary.tabProblems.EltreeProblems.TElTreeView.ClickItem("|Pain;ankle", 0);

 

Thanks.

shejuti
Occasional Contributor

Thanks @KseniaSemina  for your reply. I tried that but still not working unfortunately. I will contact the developers to find out if there is any way to handle it.

sonya_m
SmartBear Alumni (Retired)

Hi @shejuti ! Could you share your progress with us? Did you manage to find a solution?


Sonya Mihaljova
Community and Education Specialist

shejuti
Occasional Contributor

Hi,

The problem is not solved yet for the particular control. I have informed the developers about this and they are yet to get back to me. As soon as I get any update, I will post here.

 

Thanks

Shejuti

sonya_m
SmartBear Alumni (Retired)

Hi @shejuti I am just wondering how things are going for you with this issue. 


Sonya Mihaljova
Community and Education Specialist

Have you tried to record a test and spit it out as a script?

What does TestComplete return to you?

cancel
Showing results for 
Search instead for 
Did you mean: