Web Functional Testing > Function Reference > Adding Compare Data Functions

Adding Compare Data Functions

Tags:  

Description :  Compare Data are used to retrieve all the value from a HTML Table element and compare it against the any Dataset such as CSV , DB.


Where the Compare Data Functions can be used ?

Following is the scenario where Compare Data Functions can be used,

  • If the HTML table in the web page is shown from any database table, then you can compare the values in the HTML Table and the Database table using compare data functions.

How to insert Compare Data Functions in the script ?

Compare Data functions should be inserted while recording the script. During recording to insert Compare Data Function follow the below steps :
  • Click the "Insert Built-in Function" link available above the script editor
  • In the Function Category combo select "HTML Table - Data Comparison" from the list.
  • In the Functions Combo select the appropriate get function  and click on "Click to Proceed" link.
  • Select the appropriate table from the web page from which the value needs to be retrieved.
  • Based on the recording mode (Normal / Expert mode) the appropriate function will be selected in the functions combo and the table identification data will be populated in the appropriate fields.
  • Now click on the image next to Dataset combo and create new dataset to fetch values from database / csv.
  • After providing the above details click on "Paste" to add the get function in to the script.
Following are the various Compare Data functions available in QEngine :
  • compareCSV_HTMLTable
  • compareCSV_HTMLTableNM
  • compareCSV_HTMLTableColumn
  • compareCSV_HTMLTableColumnNM
  • compareCSV_HTMLTableRow
  • compareCSV_HTMLTableRowNM
  • compareDB_HTMLTable
  • compareDB_HTMLTableNM
  • compareDB_HTMLTableColumn
  • compareDB_HTMLTableColumnNM
  • compareDB_HTMLTableRow
  • compareDB_HTMLTableRowNM

compareCSV_HTMLTable

 Function Description:

 To retrieve the value of the HTML Table and compare it against the data available in a CSV file

 How to Define:

 result = compareCSV_HTMLTable("Object ID", "property")

objectID = Generated by QEngine.

property = Property to be retrieved.

 With Dynamic Property: If you need to overwrite (or dynamically change) the identification property for the HTML Element during playback then you can use the four arguments method as follows:

 

linkGetInfo("Object ID", "property", "<property_name>","<property_value>") where property name is the identification property such as "id" or "innertext" and property value is the value to be overwritten during playback.

 Example:

 result=linkGetInfo("www.adventnet.com","innertext")

displayMessage(result)

 Return Value:

 Value of the specified property

Top


0 Comments  Show recent to old
Post a comment


 RSS of this page

Copyright © 2009, Zoho Corporation. All Rights Reserved.