Discussion posts and replies are publicly visible
How can I click on
self.client.get(f"/suite/rest/a/content/latest/{opaqueContentId}/o")in order to download the file?
Hi, I already mentioned the answer above for your use case.
I think you are confused about some concepts.
When you click on a download link from the browser, it is html tag with the href attribute which has the location of the file. It is nothing but a http GET url like /suite/rest/a/content/latest/{opaqueContentId}/o . You can verify this by performing inspect on the web page. This URL returns the file.
In performance test you are only calling web APIs. So when you are using locust of appian click method in _uiform class, this method has the logic to form the request body and call the api to perform the action. Same thing happens via the browser as well but you are just mimicking the api calls using locust.
So the self.client.get is itself is performing the download. There is no other "click" that you need to do.
Thanks for reply. I understand that but I am not able to find the downloaded file any where in my system especially in Download folder.
If you want to see the file you need to save the response from self.client.get and then write the contents to a file. Can refer to this post from locust - https://github.com/locustio/locust/issues/774
But it defeats the purpose of perf test. Since locust already tracks request/response metrics. For this case it will already show the time taken for download and the size in bytes for the content downloaded.
Thank you Jithesh for quick response. you mean to say it is not necessary that file will be downloaded physically in my local drive.
yes correct
Hi Jithesh,
When I execute the script with 1 user the upload file works good but I execute the script with 2 or more users it throughs below error: