Getting the ContextMenu

Mar 18, 2013 at 2:56 PM
Hey Guys,

for several days I am going to deal with some GUI testing and White. I'm trying desperately to get a ContextMenu. I do not know why but I cant find the item anywhere (I cannot use the UISpy to find the contextMenu because the contextMenu is closed every time i bring UISpy to front).

Meanwhile, I wonder if a ContextMenu has any affiliation with the window or whether it is regarded as an independent window. Also i dont know which White element can be used to get the ContextMenu. A Menu?

The contextMenu has the AutomationID: "penContextMenu" so i thought i would find them like

Menu m = presentationWindow.Get<Menu>("penContextMenu");

But the element could not be found.

Can you help me?
Mar 19, 2013 at 1:15 PM
I solved the problem.

The ContextMenu of a window can be used like this:

presentationWindowFullscreen.Popup.Items[6].SubMenu("Freehand drawings").Click();
presentationWindowFullscreen.Popup.Items[6].SubMenu("Freehand drawings").SubMenu("Clear page").Click();

May it help the next one.


Mar 23, 2013 at 1:59 AM

White has moved to, also glad you fixed your issue.