Forum Discussion
Hallo David,
thanks for your help.
This is an example like it works at the moment.
Sub StripMenu()
'Clicks the '|Solution (stripMenu)|stripMenu|Basic' item of the 'ProjectOverviewTreeView' tree with the right mouse button.
Call Aliases.nxtSTUDIO.DefaultWorkbench1.ToolStripContainer.ToolStripContentPanel.Panel.DockPanel.DockWindow2.DockPane.PadContentWrapper.Panel.ProjectOverviewTreeView.ClickItemR("|Solution (stripMenu)|stripMenu|Basic")
'Clicks at point (26, 17) of the 'ContextMenuStrip' object.
Call Aliases.nxtSTUDIO.ContextMenuStrip.Click(26, 17)
'Moves the mouse cursor to the menu item specified and then simulates a single click.
Call Aliases.nxtSTUDIO.DefaultWorkbench1.StripMainMenu.Click("File|New|Solution...")
End Sub
Statement 2 is a problem in our tests because it click by coordinates. If a developer adds a new Item to the Menu, I will have to adapt all the tests.
What I'm searching for is a Method at the ContextStripMenu like in Statement 3, where I can choose the Item by a String.
(There is no problem by selecting the mentioned context menu.)
thanks for your help.
This is an example like it works at the moment.
Sub StripMenu()
'Clicks the '|Solution (stripMenu)|stripMenu|Basic' item of the 'ProjectOverviewTreeView' tree with the right mouse button.
Call Aliases.nxtSTUDIO.DefaultWorkbench1.ToolStripContainer.ToolStripContentPanel.Panel.DockPanel.DockWindow2.DockPane.PadContentWrapper.Panel.ProjectOverviewTreeView.ClickItemR("|Solution (stripMenu)|stripMenu|Basic")
'Clicks at point (26, 17) of the 'ContextMenuStrip' object.
Call Aliases.nxtSTUDIO.ContextMenuStrip.Click(26, 17)
'Moves the mouse cursor to the menu item specified and then simulates a single click.
Call Aliases.nxtSTUDIO.DefaultWorkbench1.StripMainMenu.Click("File|New|Solution...")
End Sub
Statement 2 is a problem in our tests because it click by coordinates. If a developer adds a new Item to the Menu, I will have to adapt all the tests.
What I'm searching for is a Method at the ContextStripMenu like in Statement 3, where I can choose the Item by a String.
(There is no problem by selecting the mentioned context menu.)
Related Content
- 6 years ago
- 2 years ago
- 4 years ago
Recent Discussions
- 7 hours ago
- 8 hours ago