My question:
I have a folder with 4 GET requests where I write out the results into variables using “Tests”.
Running them individually or the whole folder with the Runner works flawlessly.
BUT, when I schedule the runs, I always get the following error:
TypeError: Cannot read property ‘links’ of undefined
I have absolutely no clue what could be different, when I run the folder scheduled rather than manually.
Details (like screenshots):
GET request
https://api.rasterwise.com/v1/get-scrape?url=https://www.website.com&extract=links,images&scope=.class
Response body
{
"status": "success",
"pageStatus": 200,
"scrapeDate": "2022/11/24",
"results": {
"scopedto": ".class",
"links": [
{
"text": "",
"host": "example.com",
"url": "https://example.com/",
"radiusContext": {
"parentText": "test",
"nextSiblingText": "test"
}
}
],
}
}
Test
let response = pm.response.json();
pm.environment.set(“variable”, response.results.links[0].url);