Automating browser operations from MS Access

Bennet

Member
Local time
Today, 19:30
Joined
May 23, 2020
Messages
35
Hi all,

In the past I've written some fairly extensive browser automation scripts in Access VBA, using something called OpenTwebst that talked to internet explorer.

I'm now trying to move to automation of a modern browser and (as of about two hours ago) I'm learning about Selenium, and specifically "SeleniumBasic".

My main question is - Is SeleniumBasic the best way to do this in 2025? It doesn't look like it's been updated since 2016, and yet that's still the first thing that comes up when you start googling the subject.

Second question - if this is the best way, how is one meant to learn the commands? Unfortunately it doesn't come with any documentation or VBA examples to learn from.

For information, the overall aim is to automate repetetive tasks in our browser based ERP system such as writing off (thousands of) small balances, saving batches of copy invoices, things like that. As I say, I achieved all this years ago using an internet explorer based solution. Now hoping to be pointed in the right direction to get the same thing working in Edge or Firefox or Chrome. I'd really like to keep it based in VBA because it's the only language I know and I can give it a nice user friendly interface through Access and store the history of all the jobs it's processed etc.

Appreciate this is a bit niche.

Thanks.
 
One problem with asking whether something is "the best way" is that "best" is a subjective opinion, not an objective measurement. So, any answer that says, "sure, it's the best" is no better than your own evaluation.

That said, I'm sure there are members here who automate browsers from VBA, so you should get some answers. I just think the operative evaluation should be "methods that work", not necessarily, "the best method".
 
I'd really like to keep it based in VBA because it's the only language I know and I can give it a nice user friendly interface through Access and store the history of all the jobs it's processed etc.
Fair point. I was going to recommend tools in other languages that you can trigger from your Access UI, but if you want to stick to VBA, here's the deal:

1. If IE is working fine for you, that's great! is it making you uncomfortable that it's such an old browser? OK, you still have SeleniumBasic and SeleniumVBA and they work with modern browsers.

2. SeleniumBasic has no docs, but it comes with examples in the download. Making those examples work will likely solve any issue you find. If you want to work with chrome, make sure you install .NET 3.5 to have a smooth experience with the driver. If you want to work with firefox, you need the gecko driver. The drivers work for specific versions of the browsers, so keep that in mind. There are a few obscure browsers out there that apparently work with Selenium, but current web standards don't let them work properly, so I'd stick to chrome.

3. SeleniumVBA claims to have fixed SeleniumBasic, so give it a try, it is actively maintained, apparently.

4. Many times, you don't even need a browser and a properly formed HTTP request can do the job. While it requires you to investigate how things work under the hood, I'd say it is the fastest way to solve most things. For this to work, you'd have to ask the developers or maintainers of your ERP system how it works but you could also reverse engineer it yourself.

Finally, I would totally recommend BeautifulSoup, Selenium for Python and Puppeteer, which is my favorite tool. They provide the best development experience, according to me. They use other languages but don't forget you have LLM at your disposal nowadays.
 
Many thanks for all the above.

1. If IE is working fine for you, that's great! is it making you uncomfortable that it's such an old browser?

It's actually our own IT department who are putting pressure on me to stop using it, even in this controlled and limited way, because of security concerns.

SeleniumVBA looks brilliant and that's now going to be my primary avenue of investigation - thanks again.
 

Users who are viewing this thread

Back
Top Bottom