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

0 9 584
9 REPLIES 9

@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 ?https://help.appsheet.com/en/articles/1979979-invoking-the-api

Iโ€™ve never done that before but something tells me thatโ€™s gonna work. Thanks so much for the tip!

Top Labels in this Space