HTML Table to Data table

When to use the HTML Table to Data table activity

When you are required to convert the HTML Table to a Data table, this activity can be used.

Figure 1

Activity Name

Picture

HTML Table to Data table

 

web automation

 

Technical reference:

 

web automation

 

 

 Drag a HTML to Data table activity and connect it under the True Branch

  • Under the True branch connect the HTML Table to Data Table activity
  • Double-click the activity and click on the Spy symbol to open the Web Spy window on the screen
  • Double click the element on the website and select again to get the attributes appears in the Web Spy window.
  • Spy/indicate the element that is required to be acted on and click export to auto- fill the property details.
  • Add the chosen wait time in the Wait Time field (Wait Time value is in Milliseconds.
  • Declare a new variable in the Variables section by selecting "browse for types" in the Variable Type dropdown and entering the type of name as System. Data. data table

 

Figure 1.2

 

web automation

 

Figure 1.3

 

web automation

 

Figure 1.4

 

web automation

 

 

  • Enter the declared variable Data under the Out Data field.

Look for an Excel Automation grouping in the Toolbox, drag a Write activity and connect it under the HTML Table to Data Table activity to update the extracted data into an excel.

  • Go to the property section and fill in the details. File Path is appended with the filename by double clicking the activity and selecting the file from the respective folder or as an alternative enter the file name in the File Path property as a string and specify the sheet, where data is required to be written e.g., "C:\Users\<username>\Desktop\Input.xlsx
  • Select the include Column Headers checkbox
  • Select the process type as Write till data
  • Key in both the Start Column & the Start Row field with value as 1
  • Update the variable name in the Data table Input field which was already declared for HTML to Data table activity.

Figure 1.5

 

 

web automation

 

5.3.0