Monday, July 20, 2015

UFT Datatables | Accessing Datatables


In this blog, I am assuming that you have a background in Recording using Unified Functional Test (UFT). If you don't have any, you can always roam around google search and try to understand some.

First post I will be doing is about Data table. This is the collection of data you will be needing all throughout your automation testing and placed in a table form (exactly like excel sheet).

Simple and straightforward:

Figure 1.1 Getting the data from datatable

Figure 1.2 The actual datatable

Brief Explanation:

  • Dim strFirstName : This is a variable declaration.
  • ':' (colon) : This is denoting that the line after the colon (:) will be treated as the next line of code. This is the same when you write the code like the ff:
               
  • DataTable("strFirstName",dtLocalSheet) : This is the syntax for the data retrieval. The first parameter is the data column name in the actual datatable (see Figure 1.2), the 2nd parameter specifies which Datatable are you referring (dtLocalSheet refers to the 'CodeSnippetsbyRain' sheet in Figure 1.2)
Data table contains two sheets, the Global Sheet where all actions in the same script can access, while the other is the Local Sheet, and only the action can access its own script.

0 comments:

Post a Comment