Hello everyone in this community, first of all.
I want to run the collection using monitor daily morning and store the results in CSV and send it over mail
- Get the HTML reponse of the API
- Compare the date column in the response HTML table
- copy the entire row to csv if the completed date matches to the current date
<tr class="row1">
<th class="field-id"><a href="/admin/">5360</a></th>
<td class="field-staging_schema"></td>
<td class="field-target_schema"></td>
<td class="field-state">Completed</td>
<td class="field-created_at nowrap">Aug. 2, 2022, 4 a.m.</td>
<td class="field-completed_at nowrap">Aug. 2, 2022, 4:04 a.m.</td>
</tr>
I tried this: const $ = cheerio.load(pm.response.text()); console.log($("tr:nth-child(2)").text());
but not sure
- How to compare current date in above format
- how to write the console output to CSV file without using Newman and send a mail
Please help