Reputation: 21
I tried "choose file" but it is not working. I am not sure what to set 2nd argument to. I tried changing the different paths of file folder; it then navigates to the correct location but it's not selecting the text file or image in that location.
Choose File xpath ${path}
So I want to use AutoIt but I don't know how to combine it with Selenium, how to write code and where to keep the AutoIt script.
Upvotes: 1
Views: 6705
Reputation: 1
The easiest way is to write C: then image file ex. C:\image.jpg
Choose file xpath C:\yourImageofYourFile.jpg
Upvotes: -2
Reputation: 11
It's better way to get Project Path and join it with your specific upload folder. After that just put the location with file name :)
Upvotes: 0
Reputation: 741
Here you need to give two arguments
one such example line of code would be
1. Choose File ${xpath_locator} C:\Users\your_username\Desktop\fileName.txt
2. Chose File ${xpath_locator} ${file_path_variable}
where the ${file_path_varibale} taken from variable table of robot file.
you can explore more on all the Selenium Keywords in Robot Framework Here.
Upvotes: 2