TOSCA Excel Automation
Pre-requisite:
Create an Excel sheet with the following format & copy
the path of Excel sheet mentioned in system.

Write & Verify
Values in Excel
1) First we will need to
create a new project and import the standard modules. In here you'll
notice the new Tbox Excel modules are located at Tbox Standard Modules -> Tbox
XEngines -> Excel.
Following modules can help to drive automation on excel
1. TBox
Open Excel Workbook
2. TBox
Define Excel Range
3. TBox
Excel Range Manipulation(Read/Write)
4. TBox
Read Excel
5. TBox
Close Excel Workbook
2) Next, we will drag
the Tbox Open Excel
Workbook module to our test case. In it, we will enter
the location of our workbook in the path variable and the Workbook Name will
become an instance of that open workbook for use in the following steps.

3) Drag the Tbox Define Excel Range module
into the test case. The Workbook Name will be brought from step #2 above,
the Worksheet Name is the name of worksheet in the excel file. In our
case, Sheet1. The Range Name will be a variable used by Tosca Commander
for future steps and is up to your discretion. The Data Range is the
cell range on the test sheet that we would like to read. It uses the cell
letter and number, in our case A1 to Z1000. There is no real limit on
size here but the larger the area the more processing and memory that will be
required.

4) Add to your Test
case Tbox Excel Range
Manipulation, we will use the range name setup in the previous
step . Next, we can use the Data Table attribute to manipulate the excel
data like any other table in Tosca.

5) To get the values
reflected in Excel workbook , TBox Close Excel workbook to be done with Save
‘True’

Execution:


Reading Values from
Excel
Pre-requisite:
Create an Excel sheet with the following format & copy
the path of Excel sheet mentioned in system.

1) First we will need to
create a new project and import the standard modules. In here you'll
notice the new Tbox Excel modules are located at Tbox Standard Modules -> Tbox
XEngines -> Excel.
Following modules can help to drive automation on excel
1. TBox
Open Excel Workbook
2. TBox
Define Excel Range
3. TBox
Excel Range Manipulation(Read/Write)
4. TBox
Read Excel
5. TBox
Close Excel Workbook
2) Next, we will drag
the Tbox Open Excel
Workbook module to our test case. In it, we will
enter the location of our workbook in the path variable and the Workbook Name will
become an instance of that open workbook for use in the following steps.

3) Drag the Tbox Define Excel Range module
into the test case. The Workbook Name will be brought from step #2 above,
the Worksheet Name is the name of worksheet in the excel file. In our
case, Sheet1. The Range Name will be a variable used by Tosca Commander
for future steps and is up to your discretion. The Data Range is the
cell range on the test sheet that we would like to read. It uses the cell
letter and number, in our case A1 to Z1000. There is no real limit on
size here but the larger the area the more processing and memory that will be
required.

4) Add to your Test
case Tbox Excel Range
Manipulation, we will use the range name setup in the previous
step . Next, we can use the Data Table attribute to manipulate the excel
data like any other table in Tosca.
The values in row made buffer & in next
step to verify the buffer values.

Find the buffer values following below.

Comments
Post a Comment