Reputation: 2550
I need to automate a manual task to retrieve sales data from a web portal that is not setup for API access.
Can I use a test tool, such as Selenium, to do this task or is there a better solution out there.
I've never used Selenium but it looks easy enough to create record a macro for the button clicks to log in and initiate the download. I also need to trigger the download once a week, notify an email or slack channel if there is an error and then save the file with a specific name including the date.
My hope is that I can do all of this within an test automation tool but willing to explore other options.
Upvotes: 0
Views: 180
Reputation: 873
Yes it can be implemented. Once you succeed with fetching the data, change your webdriver run option to "Headless", so that Selenium will run at background and will not make the browser visible during runtime. An example for setting headless mode on Firefox:
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.addArguments("--headless")
WebDriver driver = new FirefoxDriver(options); // init driver in headless mode
After that you can use the fetched data in the rest of your program.
Upvotes: 0