When I use recorder, I have a button to upload some files. after click it, it will pop a windows browser. and the input the path, i want to upload all the files, how to do this? because when pop the windows, the focus may not change.
It’s pretty simple to implement.
Find the CSS identifier for the upload form element and use something similar to the following example (make sure the CSS is correct though for your page):
type | css=input[type=‘file’] | /Users/yourusername/Documents/MyFile.zip
type | css=input[type=‘file’] | C:\Users\yourusername\My Documents\MyFile.zip
because i am a beginner. can you show me how to insert the CSS program in recorder script? or I must use complete. how to change the script to CSS or CSS to script? if you have picture to send to me by mail, firstname.lastname@example.org it must be helpfull. Thanks.
I’d start by familiarising yourself with the following guide: https://www.katalon.com/resources-center/blog/katalon-automation-recorder/
In essence, you want to…
- Create a New script by clicking the New button
- Click Record button
- Click on the upload button on the site
- Click Stop to stop recording
It will likely not select the right Target to use it with this, so select the line it recorded when you clicked on the upload button and then click on the drop-down arrow in the Target field and find an entry that starts with “css” and select it.
Then in the Value field, all you need to do is put the full path to the file you want to upload (see the examples above).
You should then having a script that uploads the same file via the same form every time it is run.
Thank you so much this year trying it out from your help and others here. I used my google email to file upload a pdf and on my c drive as an idea. It worked well. I will try snapshot in future to show on the katalon recorder for us all. I appreciate it and I just love katalon recorder app. Just loving it. Plus the forum is older but it helps alot for many who dont know and learn alot and share experience.