I have a toolbar and want to click a button on it.
Depending on window size, the toolbar might hide that button and show a little "overflow" button at its end, which then shows a little popup menu with the hidden toolbar buttons.
So far no problems (click initial button if visible/found, else click overflow button and click popup menus button).
To ease this for multiple toolbar buttons, I aim to create a user code method. I want to pass the button/buttonInfo object to it and let it do the work. So roughly like this:
Code: Select all
public void Mouse_Click_ToolbarButton_test()
{
//Button button = repo.a.b.ButtonInfo.CreateAdapter<Ranorex.Button>(false);
Button button = repo.a.b.Button; // Ranorex checks the button now, how to suppress that?
RepoItemInfo buttonInfo = repo.a.b.ButtonInfo;
Mouse_Click_ToolbarButton(button, buttonInfo);
}
public void Mouse_Click_ToolbarButton(Button targetButton, RepoItemInfo targetButtonInfo)
{
// do something here with targetButton
}
Probably I misunderstood something of the Ranorex mechanics here. So how can I get a Button/Repository object without having it to exist? Or how to suppress the check for existence?
Thanks and Bests, Björn