0

Edge won't open.

Similar issue as reported by vasilythecat but I get an automation error message at: obj.Start "edge", ""

Automation error message

These are the steps I took.

I downloaded and installed Selenium Basic from https://github.com/florentbr/SeleniumBasic/releases/tag/v2.0.9.0 .

I downloaded the Microsoft Edge WebDriver (Stable Channel) that corresponds to the version of Edge on my machine. I copied the Edge WebDriver, msedgedriver.exe, into the directory where Selenium Basic is installed and renamed it edgedriver.exe.

I created a module in a blank Excel file and added the following code. I removed comments, if you are comparing this to the screen shot.

Option Explicit

Sub automation()
    Dim obj As New WebDriver
    obj.Start "edge", ""
End Sub

I am using Office 2019 (32-bit), Edge v99.0.1150.39 (64-bit). I also configured Excel to enable all macros.

This site mentions that Selenium Basic required .NET framework 3.5 or higher.

According to this MS article, the version of .NET Framework may be determined from the registry. This registry key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full shows that I have 4.8.04084 installed.

I tried the x86 and x64 versions of the Microsoft Edge WebDriver and got the same results.

The error also comes up when I delete edgedriver.exe and deliberately do not rename msedgedriver.exe.

As far as I can tell, Selenium Basic is still supposed to work.

This is critical to get legacy IE automation to work.

Version of Edge on my machine
Version of Edge on my machine

Location of Selenium Basic installation (x86 version of Edge WebDriver used for edgedriver.exe)
Location of Selenium Basic installation

Version of Edge WebDriver
Version of Edge WebDriver

.NET Framework version
.NET Framework version

Community
  • 1
  • 1
Ross
  • 11
  • 3
  • Oh! I forgot to mention that I also added Selenium Type Library to the Excel References. – Ross Mar 14 '22 at 20:55

1 Answers1

0

I finally found a post with an example that works.

The proper syntax to start the web browser is: obj.Start "edge"

Also, .NET Framework 3.5 needs to be installed. The code does not work when only newer versions of .NET are installed.

Instructions on how to install the .NET Framework

Ross
  • 11
  • 3