I'm currently making a program that will automate a task that I need to do on a program.
One issue I'm currently having, is "clicking" on a menu in a menu bar.
I found the class name for the menu bar using Spy++, it's called TActionMainMenuBar, but everything "under" it is localized as ammbSSC.
https://i.stack.imgur.com/swlxU.png
I can find the main menu bar using:
var x = window.Get(SearchCriteria.ByClassName("TActionMainMenuBar"));
Console.WriteLine(x.ToString());
Which returns:
Panel. AutomationId:1311676, Name:ammbSSC, ControlType:pane, FrameworkId:Win32
TestStack.White.Application
But trying to find "ACTIONS" using .ByText or .ByIndex (or anything else really) throws an exception that it can't find "ACTIONS".
Can I even find the text like this? Or should I resort to using mouse input - i.e. automating mouse movements?
EDIT:
I've tried doing it like this as well:
window.GetMultiple(SearchCriteria.ByControlType(ControlType.Pane).AndByClassName("TActionMainMenuBar"))[1].Click();
But that throws a 'Index was outside the bounds of the array.'
I've also tried doing it as:
window.GetMultiple(SearchCriteria.ByControlType(ControlType.Pane))[1].Click();
And:
window.GetMultiple(SearchCriteria.ByControlType(ControlType.Pane).AndByClassName("TActionMainMenuBar").AndByText("ACTIONS"));
window.Click();
But that moves my mouse to around the center of my screen.