Embargo69 Posted March 23, 2022 Posted March 23, 2022 Hello everyone, I need help and my question is very basic. First I'd like to describe my use case. There is a SaaS based system (website, no access to the database) and I have to export data (a .csv table) from it once per week and save it to a specific location. The export has to be done every Sunday (while I'm not working and my pc is turned off). The steps are as follows: 1.Open browser 2.Open the specific web-page 3.Login (username/password) 4.Navigate to a drop-down menu and select the third option (then wait for the page to load) 5.On the loaded page click on a symbol (not text), which then exports the data (data.csv) 6.Save the data in a specific folder. 7.Done I said that this has to be done on Sundays without my PC being turned on. Maybe this won't be an issue since I could run the script on a server, which is running 24/7 and has Microsoft Edge and Firefox. I am not asking for anyone to code anything for me here. I'd just like to ask you for suggestions on tutorials for my use-case. When I google the topic, a lot of different results come up and it's just too overwhelming to watch all of them. Could you please recommend me a tutorial or a step-by-step guide, which fits my use-case? Then I will be able to start building the script and come back later with specific questions. Thank you very much.
Solution Nine Posted March 23, 2022 Solution Posted March 23, 2022 Look at WebDriver to automate either Edge or Firefox. In Danp2 signature, there is a link to Wiki. Use the demo from the UDF to learn the basics. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
junkew Posted March 23, 2022 Posted March 23, 2022 I would look at FAQ 31 and probably use UIAutomation solution. You have to install less (or no) dependencies compared to the webdriver solution. And as your scenario looks straightforward some input per step 1.Open browser & 2.Open the specific web-page ShellExecute("chrome.exe", "http://<yoururl>--new-window --start-fullscreen") 3.Login (username/password)https://www.autoitscript.com/autoit3/docs/functions/Send.htm You probably do not want your password in plain sight so you have to think about a solution for that send("<username>") send("{TAB}") send("<password>") send("{TAB}") send("{ENTER}") 4.Navigate to a drop-down menu and select the third option (then wait for the page to load) send("{TAB}") send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{ENTER}) 5.On the loaded page click on a symbol (not text), which then exports the data (data.csv) With sending keys probably not easy This is probably where it gets easier to use UIA functions but will have a steep learning curve (also with WebDriver) In the examples section(s) on UIA you can find examples on how to handle browsers and html page 6.Save the data in a specific folder. 7.Done Probably you stay stuck at step 5 but I hope you succees with UIA or WebDriver FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now