How to download file to a specific location using Karate UI I need a file to be saved to customized location not in downloads [duplicate] - testing

This question already has answers here:
API Automation Testing : Is there any way to automate download scenario with content validation?
(2 answers)
Closed 1 year ago.
I am automating my web application using Karate UI. I want to save a file from the application to a specific location to validate. By default, it is getting saved in the system downloads folder. How do I change this download path?
I have tried
addOptions: ['user.dir','path']
userDataDir = "path"
in karate.config(---)

You may be able to do this if you control the user data dir. One of the things you can try is to move a pre-created profile where the system directory is set correctly etc.
Else please assume this is not supported - you are welcome to contribute code and research.
The recommendation is to use Karate's API testing capabilities to download a file to a controlled location: https://stackoverflow.com/a/67018365/143475

Related

How to read files from anywhere with vue.js

I am trying to read files from my music directory on my PC.
I have tried doing it with the node.js file system module, but it is not working. How do I get it to work?😢
Just a late follow-up. It is possible to read and write files using HTML5 with the FileReader and saveAs(). The browser will open a file dialogue and let the user choose the file, so the user is aware of the file access. It is not possible to read or write to a file without the user's attention.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
As said by #flame in a comment, it's just impossible, because the browser never have access to the visitor's disk (do you imagine the security issue if it was the case ?).
Vue.js is a Front-end framework, so the application it produces only have access to what the browser has access to.

Uploading image file from VBA Excel

I know this question has been asked a lot of times already but unfortunately none of the answers have helped me. I want to upload an image file to my remote Web server (Apache). In my Excel cell, I have the file path of an image and want to use VBA to upload that file to a remote server.
I can't use any 3rd party tool in conjunction (like WinSCP), because that will make my product not very "portable-friendly". I was fine with Windows FTP, but it doesn't seems to be supporting passive mode and hence I also can't use that.
There are some threads which used IE to upload the file, and some which I believe are uploading via POST request by reading file in binary mode.
I want to replicate something similar to uploading files via HTTP POST on a website.

How to download PDF in Jmeter Distributed Remote Testing on remote server?

I have designed a jmeter script to download PDF using 'Save response to a file' listener.It is working when I executed in local both in GUI and non GUI mode and the PDF is downloaded.But when im trying to run the same script in Distributed remote testing using client(windows 7) and server(windows 7) on the same subnet,unknown and plain files are getting downloaded instead of the the PDF file.
I have given folder path of the server in the Listener.Is there any other way to download the actual PDF instead of those unknown file.
thanks in advance :)
In distributed testing, jmeter uses StrippedBatch mode which strips response data when sending response to controller.
So you need to switch mode to One that does not strip like Standard:
https://github.com/apache/jmeter/blob/trunk/bin/jmeter.properties#L758
So add to user.properties:
mode=Standard
See also:
http://jmeter.apache.org/usermanual/remote-test.html
Paragraph 15.4

Monitoring if File is currently open Mac App

My app create a file on the FS and opens the file in other application(s). I want to monitor the file for changes which I already have in place, but I also want to know when the other application has closed the file. Is there some API that currently exists on mac, and it's an API that will not get my app rejected from the app store ?
I believe the thing you're looking for is in FSEvents (File System Events), specifically the FSEventStreamCreate function with the FSEventStreamEventFlag kFSEventStreamEventFlagItemModified.
As long as it's a file within the user's sandbox (or one that the user has given permission to use), I would think you should be okay for the app store.
More information can be found in this related question.

Clicking a link to remote file and editing with local app

I would like to be able to click a link which has the directory path to a remote server and be able to open a local application (namely notepad++) to edit the remote file.
I can map a drive to the remote server to allow the notepad++.exe to have a local path to look for when trying to run the application... I just need a way to get a link click to automatically open notepad++.exe with the remote file for editing.
Any ideas? I know I am vague quite a bit here but please ask for any clarifications or other dependencies you might think could work that I might add into the requirements of this question and I will be happy to respond.
Thanks for any help!
Cheers!
Yes this is a programming question how would you code this into a web page to allow for users to click a link to open a local application with a remote server path to a file to be edited it's a multi-faceted question with inclining of non-programming problems but programming still involved)... I actually just found a solution about an hour ago. Basically needed to do a javascript call passing an ActiveX object with the files location on the remote server on click and then opening a shell via javascript passing the notepad++.exe path with the file path to the remote file to open.