How to upload file using AutoIT tool in Selenium WebDriver | create & run Auto IT script in Selenium
HTML-код
- Опубликовано: 11 окт 2024
- Here, in this video, we will see How to upload file using AutoIT tool in Selenium WebDriver.
Also I have shown how you can create your own html page having upload file feature with type='file'.
Steps:
=======
1. Download and install AutoIT
Go to "www.autoitscri..."
Click on Download AutoIT button
Download "AutoIt Script Editor"
Run AutoIT setup exe file and install it.
Run Script Editor exe file and install it.
2. Create Script
Open the script editor
ControlFocus()= to focus the window
ControlSetText()= to give the File path
ControlClick()= to click on open button
-Note: controlID=Class + Instance (ComboBox1)
3. Save and compile/Build it= we need to create a .exe (executable file of AutoIT script)
4. Integrate with Selenium
Runtime.getRuntime.exec("Path of the .exe created in step 3")
===========================
Learn automation from basic !!
Selenium series videos Playlist :=
• Selenium tutorial for ...
Protractor series videos playlist :=
• Let's Learn Protractor...
Maven Tool videos playlist :=
• Maven Tool - Learn Bas...
Thanks for watching!
Keep Learning...Keep Sharing...Keep Growing.
#AjAutomation #SeleniumWebDriver
Really helpful video!
Thanks for watching..
Its very helpful ❤
Great 👍... Thanks for watching 🙂
Nice video, how to do the same when we use selenium grid. I have 8 windows node machine and want to do the same, can you please help me with this?
Thank u brother
Thanks for watching..
Many thanks for your time and effort on creating this wonderful video tutorial. How do you use AutoIT script to upload multiple files?
Hi Ade, I don't have video for that , will try to create one. For now plz watch Mukesh otwani video for upload files using AutoIT.
U can upload multiple files using files path separated by
and use sendkeys method.
same we can do by using Robot class , just save multiple paths in clipboard and then press CTRL + V...will try to create video on the same.
@@AJAUTOMATION Thanks I watched the video by Mukesh. Unfortunately there is no audio on the video when I watched it also the video description on the video was not clear. Anyway, thanks for the suggestion.
This is helpful. Sir, do you have tutorial on Selectorshub?
Thanks for watching.
Selectorhub is a great plugin, I have not created any video on selectorhub yet, will try to create one soon. you can use selectorhub to get xpath in less time.. But at the same time, I will suggest to learn to create your own customized xpath as some client projects e.g banking domain, they won't allow any plugin to be installed on browsers due to their security concerns. Also if you learn, that will help you in interviews if someone asks you to write xpath on your own and Not using any plugin. So learn Selectorhub but don't get used to it, make sure you are capable enough to create your own customized xpath. There are videos on playlist which will help you become master in Xpath.
@@AJAUTOMATION Yes sir, I was having the same perception. Today I was the video at SelectorsHub channel and got to know many misconceptions which we learnt by using devtools to write xpath. SelectorsHub helps a lot in learning right concept like shadow dom, svg and error handling which devtools doesn't support.
Thank you Sir
Welcome 🙂👍
Hello Sir, i need to automate uploading a .jpg file in one testcase and multiple .jpg files in another testcase.. and it should run in Jenkins.. wat i suppose to implement. AutoIt or Robot class or anything else..
Please do reply
U can use Robot and Auto IT multiple scripts for multiple files uploads...keep all files in same folder and If type = file is available then send keys will also work just concate the multiple files names
I tried Sir to uplaod the file usinf AuroIt tool where type =file,but it is unable to..I am giving the same xpath address for the website of cgi-lib...why It is not identifying the xpath address?
Cud u please show that in the video if u cud makw a separate small video showing how to navigate through smae website and uploading file using Autoit instead of Sendkeys method.
Thank you for teaching us Sir
Hi @Marlyn Thanks for asking . I will chk why Auto IT is not working instead of sendkeys where type='file' is available ..
When I run the program, auto it.exe disappears from the folder. Why is this happening?
Not sure what's the issue but r you able to see that script is able to upload files
@@AJAUTOMATION no..At the execution time, it disappears, so it does not show the uploading
May I know how to validate print output(pdf ) or print dialog output by selenium automation
I think I don't understand ur question.. You want to print / verify text in the PDF right ?
Hi
How to upload local files by drag and drop in selenium
Hi nagarjun, not sure about drag and drop files but I have used sendkeys method to upload multiple files using files path separated by
.
we can also use Robot class , just save multiple paths in clipboard and then press CTRL + V...will try to create video on the same.
Hi AJ
For file upload robot class is working , but I want to drag and drop the local system files .
Actually drag and drop is a requirement for me .
Even I tried with JSexecutor also facing issue .
Thanks for ur reply