I have a script that goes to a vendor’s website and logs-in with a username and password and then uploads a file for their consumption. The code works when I run it in my python editor but when i run it through EasyMorph it gets to the upload screen and then nothing happens but the script doesnt fail it successfully runs. Any ideas why it’s not working?
Hi Ethan and welcome to the Community!
A few questions:
- How do you know it’s getting to the upload screen?
- How do you know it successfully runs?
- Did you try to run the script from the command line under the same Windows account that is used by EasyMorph (I suppose yours)?
Finally, did you consider uploading the file using EasyMorph? In the “Web request” action it is possible to specify the request body as a file. It doesn’t work for multi-part uploads, but in some cases might work.
- When I run the Python script through EasyMorph I have it login to the vendor’s website using Selenium, then navigate to the upload page and then I’m having it sleep on the upload/input page before it’s supposed to send the file (so I can verify it made it that far)
- I say it successfully runs in that no error pops up in EasyMorph and i added a random print statement line right after the command to send the file to the site and while the file doesnt get uploaded to the site, the print line executes and returns in EM after
- I hadn’t tried this until now and it does the same thing as when it’s ran through EasyMorph (does everything it’s supposed to except actually upload the file)
I got it to work! It seems the issue was that I wasn’t giving the script enough time to execute the file upload before it closed out the browser - thank you for your help!