Scenario: User wants to store Excel worksheet names in different buffers.
This can be achieved by scanning one of the Excel tab by using UIA engine.
1. Scan Excel tab by using UIA Engine (Scan Application -> Desktop scan -> Right click on the Excel file -> Select UIA Engine). Here, I have scanned all 6 tabs as per our example just to show all the tabs. All 6 sheets are uniquely identified by its Name property.
Remove other 5 sheet tabs as it was just shown for demonstration.
Change Technical Property Name to Sheet Tab* as per below screenshot. By doing so, this control will not be shown as uniquely identified.
As control is not identified uniquely, Tosca xscan will show total number of similar controls when “Identify by Index” is selected. Save the module.
2. Create a test case and use TBox Start Program module to open Excel file.
3. As soon as the tab gets visible, Get ResultCount of number of Tabs present in an Excel file by applying ResultCount property in scanned module.
SheetNo will store total number of tabs present in an Excel file, which are 6 in this case.
4. Store Sheetnames in 6 different buffers using “Name” property as shown in below example.