Accessing the ContextMenu of a DataGridViewRow

426 views
Skip to first unread message

Paul Kertscher

unread,
Dec 20, 2013, 9:12:28 AM12/20/13
to teststa...@googlegroups.com
Hello, 

I have an issue regarding TestStack.White and I hoped this list might possibly help me out. I have a DataGridView with a ContextMenu opening on right clicks on the rows. The application is quite stable and tested, bt now I'd like to convert my manual tests to automated tests and this is quite a deal. I'ts been quite straight forward getting the DataGridView and clicking the rows - even if it could be a bit faster - but I was not able to figure out how to get the (open) context menu of a DataGridViewRow. I tried GetMultiple(SearchCriteria.All) on the window, but this collection does not seem to contain any context menu. I also tried the following: https://white.codeplex.com/workitem/3371

By now nothing worked to get the ContextMenu. I would be very grateful if someone could help me with it.

Best regards,
aul


Jake Ginnivan

unread,
Dec 20, 2013, 9:16:05 AM12/20/13
to Paul Kertscher, teststa...@googlegroups.com

These tests show how to use the Context menu. It is a property on the window.

 

https://github.com/TestStack/White/blob/master/src/TestStack.White.UITests/ControlTests/MenuItems/PopUpMenuTest.cs

 

The reason is that it exists outside the automation tree of the window. Hope that helps.

 

Cheers,

Jake

--
You received this message because you are subscribed to the Google Groups "TestStack.White" group.
To unsubscribe from this group and stop receiving emails from it, send an email to teststack_whi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Karthi

unread,
Jun 10, 2016, 2:46:30 AM6/10/16
to TestStack.White, paul.czi...@gmail.com
Hi,

i'm facing similar issue , i have tried the below help link. That link got broken. can you please help me on this.

--Karthi

Rameshwari M

unread,
Oct 29, 2017, 8:07:22 AM10/29/17
to TestStack.White
Hi, 
can anyone let me know how to get the contextmenu when i click a button. This context Menu will appear after the button is clicked.

Thanks
Rameshwari
Reply all
Reply to author
Forward
0 new messages