Forum Discussion

betty1's avatar
Occasional Contributor
2 years ago

Name Mapping WPF Tabs

I am testing a WPF application where the user can dynamically configure the Tab Items displayed on the screen (and the order in which they are displayed).  I would like to organize my namemapping by the  tab the data exists on, the subsection where the data exists (stack panel, grid, etc.).  First, I need to map the tabs.  I would like to be able to "click on" or bring up the desired tab programmatically regardless if it is TabItem 1, TabItem 2, etc.  The way the code is organized is






Here is the full path for WPFObject("LayoutDocumentTabItem","",1):

Sys.Process("SiMPEX").WPFObject("HwndSource: ShellView", "SiMPEX").WPFObject("ShellView", "SiMPEX", 1).WPFObject("Grid", "", 1).WPFObject("PluginsGrid").WPFObject("Border", "", 1).WPFObject("DockingManager", "", 1).WPFObject("LayoutPanelControl", "", 1).WPFObject("LayoutDocumentPaneGroupControl", "", 1).WPFObject("LayoutDocumentPaneControl", "", 1).WPFObject("TabItem", "", 1).WPFObject("LayoutDocumentTabItem", "", 1)


1. Is there a way to map an alias to the TabItem that is independent of which tab # the item is?

2. In order to use the created alias in a keyword test, would I map the WPFObject("TabItem","",1) item or the WPFObject("LayoutDocumentTabItem","",1).  Note, I will want to use this as a parent item to map the data that is on each of these tabs.

  • There was a title for each TabItem and I used that as a property for mapping the tab and now the tabs can be in any order.

3 Replies