Forum Discussion
ebarbera Thank You for the quick response and apologies for not providing complete details.
Below is the error that I am getting
"Popup menu was not found for the "Aliases.DataExplorer.Shell2.Composite2.Composite.Composite.Composite.CTabFolder.ContributedPartRenderer_1.CTabFolder.StatisticsComposite.ListView" object. 0:50:36 Normal 11.22"
The Popup menu was not found because ClickItemR was not successful.
I also tried using the ClickR function and provided proper x, y coordinates. Here too the app is inconsistent. It sometimes opens the context menu and sometimes doesnt.
I added a delay of 2000 ms in between each step. No luck
The version of TestComplete I am using: 14.93.312.7 (running on 64 bit)
Now when I was checking what's new on TestComplete 15.10 page, I see a comment about improved "click-related" actions. I will upgrade my installation and try. Meanwhile, if you have any suggestions I would be grateful.
- naveenchandravp4 years agoOccasional Contributor
Little disappointed as TestComplete 15.10 also fails to fix this problem. Same behavior.
Can you please let me know if there is something that I need to do? Or you need more details around this topic.
Thanks,
Naveen
- naveenchandravp4 years agoOccasional Contributor
For anyone who is struggling with the same problem, I wrote a python script (which is just a workaround and not the desired way of opening the context menu on lists) which seems to be working for me.
def open_context_menu():
arr = Sys.Process("<ProcessName>").FindAllChildren("WndClass", "SysListView32", 50)
if len(arr) > 0:
for i in range (0, len(arr)):
if True == arr[i].Focused:
arr[i].ClickR()
Log.Message("Context Menu Opened Successfully!")
break
else:
Log.Error("No List Objects were found.")ebarbera I would still like to hear from you if there is any better approach for this issue.
- chriscc4 years agoContributor
The issue could be that there is more than one SysListView32 control. It could be on the same Form or maybe in memory and not visible. This could explain why you are seeing inconsistent results and why looping an array of list view controls seems to work.
A couple of things you could try.
1. Narrow you search by specifying parameters that are unique to the control. For example, make sure it is visible. Or if it has a unique index you could specify that.
Listview = Sys.Process("<ProcessName>").FindChild(new Array("WndClass","Visible", "Index") , new Array("SysListView32", true, 1), 50)
2. Get a parent object closer to the desired SystemListView32 object.
Parent = Sys.Process("<ProcessName>").FindChild(new Array("WndClass","Visible") , new Array("#32770", true), 50)
ListView = Parent.FindChild(new Array("WndClass","Visible", "Index") , new Array("SysListView32", true, 1), 50)
I hope this helps.
Related Content
- 5 years ago
- 7 years ago
Recent Discussions
- 15 hours ago
- 15 hours ago
- 4 days ago