public void SelectDatasetOrDatatableByIndex(int index) { var stepTwoPane = ExcelClient4().UIDatasetsDatatablesPane; var datasetsScrollViewer = new WpfScrollViewer(stepTwoPane); var datasetsListView = new UIDatasetsDatatablesLiList(datasetsScrollViewer); datasetsListView.SearchProperties[WpfList.PropertyNames.AutomationId] = "DatasetsDatatablesListView"; datasetsListView.SelectedIndices = new int[] { index }; }
public void SelectDatasetOrDatatableByName(string name) { Playback.PlaybackSettings.MatchExactHierarchy = false; var stepTwoPane = ExcelClient4().UIDatasetsDatatablesPane; var datasetsScrollViewer = new WpfScrollViewer(stepTwoPane); var datasetsListView = new UIDatasetsDatatablesLiList(datasetsScrollViewer); datasetsListView.SearchProperties[WpfList.PropertyNames.AutomationId] = "DatasetsDatatablesListView"; datasetsListView.SelectedItemsAsString = name; Playback.PlaybackSettings.MatchExactHierarchy = true; }