Forum Discussion
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.
Hi naveenchandravp -
Apologies on the delayed response - we do have a document that outlines specific suggestions when working with listview items, maybe this will be of more help (https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/standard/list-view/addressing-items.html). It is a bit tricky to diagnose the right click issue without having seen it I apologize but if I find out any additional information I will let you know. I will also pass along this information to product.
Let me know if you have further questions.
Emma
- naveenchandravp3 years agoOccasional Contributor
ebarbera Thanks for the response!
The page talks about the ClickItem function, which is working perfectly fine for me. My concern is w.r.t ClickItemR and ClickR functions which simulate right-click.
I understand it's difficult to suggest anything without actually being able to reproduce the problem. Will it help if I create a sample application and provide reproducable steps?
- ebarbera3 years agoStaff
Hi naveenchandravp -
Yes - this would be very helpful.
The reason I suggested that document is because sometimes if one approach is not working with automation it is best to use a workaround. But if you are trying to validate the functionality of the right click specifically I understand your concern.
Thanks,
Emma
Related Content
- 5 years agom_essaid
- 11 months agoakilan
- 2 years agoPanaFlorinIonut
Recent Discussions
- 2 days agoGane195