I am trying to automate an application using pywinauto. As a part of this,I am trying to get the file path of an excel file as an input from the user from my Python application and trying to automate another application. But the file browser window (of the application to be automated) does not accept file path as an input.
My objective is that it should open the file using the path that is taken from the user using my Python application. I want to automate this window, but I am stuck on this Open window for quite some time.
Can someone help me on how I can automate this? I am fairly new to this so any help regarding this is appreciated.
Related
So I have developed a python script which opens Slack app (which is based on Chromium) with a remote-debugging-port, and then injects a JavaScript bundle. Ideally I'd like to instead make a shell script which called the python file (and checked if python was available in the right version etc!) first.
This however would require the user to call the shell script from the terminal
What I'd really like would be a single executable file that contains:
the .sh script file
the .js bundle that gets injected
the .py file that the script calls
bonus, an icon that would show for the program in MacOS
It's been great developing the proof of concept so far, but creating an application is a new step to me. What is a way to create a (double)clickable file that contains the 4 files above and doesn't need to live in a terminal tab? Thanks
PS. This will always remain a simple app so simplicity is probably a key consideration.
I apologise for my over-simplification of the problem. May I ask does anyone know the feasible workflow (in Python) of how can the Window PC automatically locate new excel file generated from python script and send out emails daily? Thanks.
I am automating a web application using squish tool in python scripting. In a feature there is a file upload test scenario where I have to upload a file from the windows hard drive.
I have recorded the scenario but didn't get how to upload the file.
Can someone help me to resolve the problem
You can try using nativeType() function to send file path and to hit enter key on the focused window (i.e. file open dialog)
Here is an example by Squish
What is an easy(simple/clean) way to add few steps to interact with windows based elements within python selenium script?
eg:
Click a download button via selenium driver, change the file name and location and click save button on windows dialog.
Note:
Downloads button is just an example. I pretty much want to know a common way to handle any kind of items.
I do not want a way where they recommend a way to configure browser such that downloads happen automatically at a specific location on our system.
Way to execute my scenario:
Keep this setting turned ON in chrome.
Ask where to save each file before downloading.
Website to try - https://www.seleniumhq.org/download/.
Try downloading anything.
There is a project called Winium, remote driver implementation of Selenium for automating desktop applications. This could help you with this job.
You can spy ui using Inspect.
Find the samples at https://github.com/2gis/Winium.Desktop/wiki/Magic-Samples
Try to use AUTO It, it will be useful in Interacting with windows based applications in selenium.
Check out here - https://www.guru99.com/use-autoit-selenium.html
Hope This Helps You.
I tried file upload using Selenium WebDriver (Python), but I can't upload it.
I want to upload the file to this website.
https://iotcube.net/process/type/wf1
But, when I tried sending a file using 'send_keys', it not worked.
I run that code in Python:
driver.find_element_by_id('my-awesome-dropzone').send_keys('FilePath')
How can I send file to that website? Help me.
if its a window based file handling then selenium alone wont workout. You have to either use AutoIT or ROBOT.
Can have a look at this