0

I am a newbie trying to implement selenium to select a button on a website. After watching this tutorial youtube guide

I downloaded SeleniumBasic from Github and added the reference to VBA.

https://github.com/florentbr/SeleniumBasic/releases/tag/v2.0.9.0

At running the macro I get an error message "class not registered 80040154".

enter image description here

1) Will installing chromedriver solve the problem?

ChromeDriver - WebDriver for Chrome

2) I am using windows 10 and chrome but the code is meant to be used by multiple users, using different OS. Will it work for all OS on chrome? (I understand that every browser will need a different driver).

3) Must I choose the path "C:\Users\ *Username\AppData\Local\SeleniumBasic" ? That will be a hassle to manually install the ChromeDriver and SeleniumBasic to this path in every users PC.

4)I guess I would like to add the SeleniumBasic reference programmatically with Way 1 (Using GUID) How to add a reference programmatically with Determine the File Path or GUID to a VBA Reference Library in order to save repeating the referencing in each installation.

Noam Brand
  • 335
  • 3
  • 13

2 Answers2

1
  1. Download ChromeDriver or firefox webdriver.

  2. Check if you are matching the system arch of your computer: 32 with 32 and 64 with 64.

  3. Select the patch of webdriver like that: "C://*user*//folder//folder//folder"

-1

I would suggest you to use Selenium+java to automate your stuff. Because VBA is Visual Basic for Applications that runs inside in excel,word, etc... i.e in Windows Machines.

So, to run run the VBA macros in Linux machine, you need to install a software called 'Wine' first. Mac system supports VBA, but your code written in windows machine will not work completely perfect in Mac. You may need to modify your code for Mac.

Java is platform independent. So, if you use that, then you can run your code in any OS's. Also, it is very easy to automate and debug your code in Eclipse IDE(one of the famous IDE for java development) than in VBA editor.

You can follow the below links for detailed setup.

Step 1: Setup selenium in your machine

Step 2: Run your first chrome automation

Step 3: Export your code as jar file for other users

Kalicharan.N
  • 134
  • 7
  • I don't know JAVA. Can I run VBA code with Eclipse without knowing JAVA? – Noam Brand Jun 07 '20 at 08:06
  • No, you cant run. Eclipse is just an development environment, on which you need to write your code. If you still want to use VBA, you can go ahead and use. But, it will not work in all the OS's as you expected. You will spend most of the time in code maintenance. – Kalicharan.N Jun 07 '20 at 16:00