Using Selenium With Import CSV

I import data from csv’s on a daily basis using an Import from CSV action. I’ve automated the entire process using selenium, however, I’m stuck on the last step which is that selenium doesn’t recognize the Import CSV dialog window in Chrome/OSX which means I can’t select the CSV I want to import. Does anyone know of any workarounds/have any ideas how I can automate picking the csv from my local hd or google drive account?

I’m using Python/OSX/Chrome

@Phil any ideas why the dialogue box wouldn’t show up for RPA?

Is it 1 CSV per day? If so, why can’t the file name be based on the date?
If multiple, then can you can use a loop and rename the files …_done.CSV after import and ignore them.
This assumes selenium can write to that field.

It’s not a filename issue, it’s the fact that Selenium can’t interact with the ‘Open File…’ dialog window in Chrome because it’s an OSX window, it doesn’t have an XPATH or object ID. My guess is that there might be another library like Robot that I could supplement my script with. I’m at the point where selenium will click on the appsheet action, it opens the Open File dialog window and now I just need to be able to select the file and press the Enter key and I’ll be golden.

Ok, understood. I’m sorry I don’t know anyway to overcome the limitation. I’m not sure if you could do it alternatively. I have a client for whom I developed CSV import using a GAS web app with a trigger. He uploads the csv file to a specific drive folder and the script does the import.

That could work. If i set the download folder to a google drive folder then I can have apps script do the rest. How did you manage to have apps script call the appsheet import csv action?

I didn’t- I directly wrote to the sheet from the script.

Gotcha. In my case, the action is neccessary because it’s triggering virtual columns to update which wouldn’t happen if i was writing directly to the sheet.

Can you trigger the action from the API ?