Download files from HTML table


#1

I want to use UiPath to download some files from a webpage, but only on certain conditions. The page contains a table of files, one of the columns contains the download link, another contains a “Last Downloaded Date”. I only want to download files that do NOT have a last downloaded date.

<table id="dataTable">
	<thead>
		<tr>
			<th style="width: 139px;">
				<div style="padding-left:5px;padding-right:10px;white-space:nowrap;text-decoration: underline;text-align:left">ID</div>
			</th>
			<th style="width: 300px;">
				<div style="padding-left:5px;padding-right:10px;white-space:nowrap;text-decoration: underline;text-align:left">Account Name</div>
			</th>
			<th style="width: 282px;">
				<div style="padding-left:5px;padding-right:10px;white-space:nowrap;text-decoration: underline;text-align:left">File Type</div>
			</th>
			<th style="width: 139px;">
				<div style="padding-left:5px;padding-right:10px;white-space:nowrap;text-decoration: underline;text-align:center">Date</div>
			</th>
			<th style="width: 136px;">
				<div style="padding-left:5px;padding-right:10px;white-space:wrap;text-decoration: underline;text-align:center">Last Download Date</div>
			</th>
			<th style="width: 71px;">
				<div style="padding-left:5px;padding-right:10px;white-space:nowrap;text-decoration: underline;text-align:right">Size MB</div>
			</th>
			<th style="width: 138px;">
				<div style="padding-left:5px;padding-right:10px;white-space:nowrap;text-decoration: none;text-align:center">Download</div>
			</th>
		</tr>
	</thead>

	<tr>
		<td>ABC123</td>
		<td>Account 1</td>
		<td>ZIP File</td>
		<td>16/11/17</td>
		<td/>
		<td>11.65</td>
		<td>
			<a onclick="javascript:App.downloadFile('acbf54add47d11e780f095013bcae46c');" href="javascript:void(0);">
				DOWNLOAD
			</a>
		</td>
	</tr>
	<tr>
		<td>ABC456</td>
		<td>Account2</td>
		<td>ZIP File</td>
		<td>15/11/17</td>
		<td/>
		<td>0.01</td>
		<td>
			<a onclick="javascript:App.downloadFile('5b93992cd3d111e7b110d92549a67c69');" href="javascript:void(0);">
					DOWNLOAD
			</a>
		</td>
	</tr>
	<tr>
		<td>DEF123</td>
		<td>Account3</td>
		<td>ZIP File</td>
		<td>14/11/17</td>
		<td>28/11/17</td>
		<td>10.47</td>
			<td>
				<a onclick="javascript:App.downloadFile('840ff921d3d111e7a979e7b3f4340a72');" href="javascript:void(0);">
						DOWNLOAD
				</a>
			</td>
		</tr>
	</tbody>
</table>

#2

I was able to work this out on my own using “Get Children” on the table element, and searching the particular column for an empty value, and clicking on the link in the same row.